<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>pybindgen.typehandlers.base</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pybindgen-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="pybindgen-module.html">Package&nbsp;pybindgen</a> ::
        <a href="pybindgen.typehandlers-module.html">Package&nbsp;typehandlers</a> ::
        Module&nbsp;base
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="pybindgen.typehandlers.base-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="pybindgen.typehandlers.base-module.html">Module pybindgen.typehandlers.base</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">   1</tt>  <tt class="py-line"><tt class="py-comment">## -*- python -*-</tt> </tt>
<a name="L2"></a><tt class="py-lineno">   2</tt>  <tt class="py-line"><tt class="py-comment">## pylint: disable-msg=W0142,R0921</tt> </tt>
<a name="L3"></a><tt class="py-lineno">   3</tt>  <tt class="py-line"> </tt>
<a name="L4"></a><tt class="py-lineno">   4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">   5</tt>  <tt class="py-line"><tt class="py-docstring">Base classes for all parameter/return type handlers,</tt> </tt>
<a name="L6"></a><tt class="py-lineno">   6</tt>  <tt class="py-line"><tt class="py-docstring">and base interfaces for wrapper generators.</tt> </tt>
<a name="L7"></a><tt class="py-lineno">   7</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L8"></a><tt class="py-lineno">   8</tt>  <tt class="py-line"> </tt>
<a name="L9"></a><tt class="py-lineno">   9</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Module pybindgen.typehandlers.codesink=pybindgen.typehandlers.codesink-module.html"><a title="pybindgen.typehandlers.codesink" class="py-name" href="#" onclick="return doclink('link-0', 'codesink', 'link-0');">codesink</a></tt> </tt>
<a name="L10"></a><tt class="py-lineno">  10</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">warnings</tt> </tt>
<a name="L11"></a><tt class="py-lineno">  11</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Package pybindgen.typehandlers.ctypeparser=pybindgen.typehandlers.ctypeparser-module.html"><a title="pybindgen.typehandlers.ctypeparser" class="py-name" href="#" onclick="return doclink('link-1', 'ctypeparser', 'link-1');">ctypeparser</a></tt> </tt>
<a name="L12"></a><tt class="py-lineno">  12</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L13"></a><tt class="py-lineno">  13</tt>  <tt class="py-line"><tt id="link-2" class="py-name" targets="Variable pybindgen.typehandlers.base.logger=pybindgen.typehandlers.base-module.html#logger"><a title="pybindgen.typehandlers.base.logger" class="py-name" href="#" onclick="return doclink('link-2', 'logger', 'link-2');">logger</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">"pybindgen.typehandlers"</tt><tt class="py-op">)</tt> </tt>
<a name="L14"></a><tt class="py-lineno">  14</tt>  <tt class="py-line"> </tt>
<a name="L15"></a><tt class="py-lineno">  15</tt>  <tt class="py-line"> </tt>
<a name="L16"></a><tt class="py-lineno">  16</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L17"></a><tt class="py-lineno">  17</tt>  <tt class="py-line">    <tt id="link-3" class="py-name" targets="Function pybindgen.typehandlers.base.all()=pybindgen.typehandlers.base-module.html#all"><a title="pybindgen.typehandlers.base.all" class="py-name" href="#" onclick="return doclink('link-3', 'all', 'link-3');">all</a></tt> </tt>
<a name="L18"></a><tt class="py-lineno">  18</tt>  <tt class="py-line"><tt class="py-keyword">except</tt> <tt class="py-name">NameError</tt><tt class="py-op">:</tt> <tt class="py-comment"># for compatibility with Python &lt; 2.5</tt> </tt>
<a name="all"></a><div id="all-def"><a name="L19"></a><tt class="py-lineno">  19</tt> <a class="py-toggle" href="#" id="all-toggle" onclick="return toggle('all');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base-module.html#all">all</a><tt class="py-op">(</tt><tt class="py-param">iterable</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="all-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="all-expanded"><a name="L20"></a><tt class="py-lineno">  20</tt>  <tt class="py-line">        <tt class="py-docstring">"Returns True if all elements are true"</tt> </tt>
<a name="L21"></a><tt class="py-lineno">  21</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">element</tt> <tt class="py-keyword">in</tt> <tt class="py-name">iterable</tt><tt class="py-op">:</tt> </tt>
<a name="L22"></a><tt class="py-lineno">  22</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">element</tt><tt class="py-op">:</tt> </tt>
<a name="L23"></a><tt class="py-lineno">  23</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L24"></a><tt class="py-lineno">  24</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L25"></a><tt class="py-lineno">  25</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt>  </tt>
<a name="L26"></a><tt class="py-lineno">  26</tt>  <tt class="py-line">    <tt class="py-name">set</tt>  </tt>
<a name="L27"></a><tt class="py-lineno">  27</tt>  <tt class="py-line"><tt class="py-keyword">except</tt> <tt class="py-name">NameError</tt><tt class="py-op">:</tt>  </tt>
<a name="L28"></a><tt class="py-lineno">  28</tt>  <tt class="py-line">    <tt class="py-keyword">from</tt> <tt class="py-name">sets</tt> <tt class="py-keyword">import</tt> <tt class="py-name">Set</tt> <tt class="py-keyword">as</tt> <tt class="py-name">set</tt>   <tt class="py-comment"># Python 2.3 fallback </tt> </tt>
<a name="L29"></a><tt class="py-lineno">  29</tt>  <tt class="py-line"> </tt>
<a name="L30"></a><tt class="py-lineno">  30</tt>  <tt class="py-line"> </tt>
<a name="L31"></a><tt class="py-lineno">  31</tt>  <tt class="py-line"> </tt>
<a name="L32"></a><tt class="py-lineno">  32</tt>  <tt class="py-line"> </tt>
<a name="CodegenErrorBase"></a><div id="CodegenErrorBase-def"><a name="L33"></a><tt class="py-lineno">  33</tt> <a class="py-toggle" href="#" id="CodegenErrorBase-toggle" onclick="return toggle('CodegenErrorBase');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.CodegenErrorBase-class.html">CodegenErrorBase</a><tt class="py-op">(</tt><tt class="py-base-class">Exception</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CodegenErrorBase-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="CodegenErrorBase-expanded"><a name="L34"></a><tt class="py-lineno">  34</tt>  <tt class="py-line">    <tt class="py-keyword">pass</tt> </tt>
</div><a name="L35"></a><tt class="py-lineno">  35</tt>  <tt class="py-line"> </tt>
<a name="NotSupportedError"></a><div id="NotSupportedError-def"><a name="L36"></a><tt class="py-lineno">  36</tt> <a class="py-toggle" href="#" id="NotSupportedError-toggle" onclick="return toggle('NotSupportedError');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.NotSupportedError-class.html">NotSupportedError</a><tt class="py-op">(</tt><tt class="py-base-class">CodegenErrorBase</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NotSupportedError-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="NotSupportedError-expanded"><a name="L37"></a><tt class="py-lineno">  37</tt>  <tt class="py-line">    <tt class="py-docstring">"""Exception that is raised when declaring an interface configuration</tt> </tt>
<a name="L38"></a><tt class="py-lineno">  38</tt>  <tt class="py-line"><tt class="py-docstring">    that is not supported or not implemented."""</tt> </tt>
</div><a name="L39"></a><tt class="py-lineno">  39</tt>  <tt class="py-line"> </tt>
<a name="CodeGenerationError"></a><div id="CodeGenerationError-def"><a name="L40"></a><tt class="py-lineno">  40</tt> <a class="py-toggle" href="#" id="CodeGenerationError-toggle" onclick="return toggle('CodeGenerationError');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.CodeGenerationError-class.html">CodeGenerationError</a><tt class="py-op">(</tt><tt class="py-base-class">CodegenErrorBase</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CodeGenerationError-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="CodeGenerationError-expanded"><a name="L41"></a><tt class="py-lineno">  41</tt>  <tt class="py-line">    <tt class="py-docstring">"""Exception that is raised when wrapper generation fails for some reason."""</tt> </tt>
</div><a name="L42"></a><tt class="py-lineno">  42</tt>  <tt class="py-line"> </tt>
<a name="TypeLookupError"></a><div id="TypeLookupError-def"><a name="L43"></a><tt class="py-lineno">  43</tt> <a class="py-toggle" href="#" id="TypeLookupError-toggle" onclick="return toggle('TypeLookupError');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.TypeLookupError-class.html">TypeLookupError</a><tt class="py-op">(</tt><tt class="py-base-class">CodegenErrorBase</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TypeLookupError-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="TypeLookupError-expanded"><a name="L44"></a><tt class="py-lineno">  44</tt>  <tt class="py-line">    <tt class="py-docstring">"""Exception that is raised when lookup of a type handler fails"""</tt> </tt>
</div><a name="L45"></a><tt class="py-lineno">  45</tt>  <tt class="py-line"> </tt>
<a name="TypeConfigurationError"></a><div id="TypeConfigurationError-def"><a name="L46"></a><tt class="py-lineno">  46</tt> <a class="py-toggle" href="#" id="TypeConfigurationError-toggle" onclick="return toggle('TypeConfigurationError');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.TypeConfigurationError-class.html">TypeConfigurationError</a><tt class="py-op">(</tt><tt class="py-base-class">CodegenErrorBase</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TypeConfigurationError-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="TypeConfigurationError-expanded"><a name="L47"></a><tt class="py-lineno">  47</tt>  <tt class="py-line">    <tt class="py-docstring">"""Exception that is raised when a type handler does not find some</tt> </tt>
<a name="L48"></a><tt class="py-lineno">  48</tt>  <tt class="py-line"><tt class="py-docstring">    information it needs, such as owernship transfer semantics."""</tt> </tt>
</div><a name="L49"></a><tt class="py-lineno">  49</tt>  <tt class="py-line"> </tt>
<a name="L50"></a><tt class="py-lineno">  50</tt>  <tt class="py-line"> </tt>
<a name="join_ctype_and_name"></a><div id="join_ctype_and_name-def"><a name="L51"></a><tt class="py-lineno">  51</tt> <a class="py-toggle" href="#" id="join_ctype_and_name-toggle" onclick="return toggle('join_ctype_and_name');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base-module.html#join_ctype_and_name">join_ctype_and_name</a><tt class="py-op">(</tt><tt class="py-param">ctype</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="join_ctype_and_name-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="join_ctype_and_name-expanded"><a name="L52"></a><tt class="py-lineno">  52</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L53"></a><tt class="py-lineno">  53</tt>  <tt class="py-line"><tt class="py-docstring">    Utility method that joins a C type and a variable name into</tt> </tt>
<a name="L54"></a><tt class="py-lineno">  54</tt>  <tt class="py-line"><tt class="py-docstring">    a single string</tt> </tt>
<a name="L55"></a><tt class="py-lineno">  55</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L56"></a><tt class="py-lineno">  56</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; join_ctype_and_name('void*', 'foo')</tt> </tt>
<a name="L57"></a><tt class="py-lineno">  57</tt>  <tt class="py-line"><tt class="py-docstring">    'void *foo'</tt> </tt>
<a name="L58"></a><tt class="py-lineno">  58</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; join_ctype_and_name('void *', 'foo')</tt> </tt>
<a name="L59"></a><tt class="py-lineno">  59</tt>  <tt class="py-line"><tt class="py-docstring">    'void *foo'</tt> </tt>
<a name="L60"></a><tt class="py-lineno">  60</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; join_ctype_and_name("void**", "foo")</tt> </tt>
<a name="L61"></a><tt class="py-lineno">  61</tt>  <tt class="py-line"><tt class="py-docstring">    'void **foo'</tt> </tt>
<a name="L62"></a><tt class="py-lineno">  62</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; join_ctype_and_name("void **", "foo")</tt> </tt>
<a name="L63"></a><tt class="py-lineno">  63</tt>  <tt class="py-line"><tt class="py-docstring">    'void **foo'</tt> </tt>
<a name="L64"></a><tt class="py-lineno">  64</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; join_ctype_and_name('C*', 'foo')</tt> </tt>
<a name="L65"></a><tt class="py-lineno">  65</tt>  <tt class="py-line"><tt class="py-docstring">    'C *foo'</tt> </tt>
<a name="L66"></a><tt class="py-lineno">  66</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L67"></a><tt class="py-lineno">  67</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">ctype</tt><tt class="py-op">[</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'*'</tt><tt class="py-op">:</tt> </tt>
<a name="L68"></a><tt class="py-lineno">  68</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-op">-</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">ctype</tt><tt class="py-op">)</tt> <tt class="py-op">-</tt> <tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L69"></a><tt class="py-lineno">  69</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">ctype</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-string">'*'</tt><tt class="py-op">:</tt> </tt>
<a name="L70"></a><tt class="py-lineno">  70</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">ctype</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">' '</tt><tt class="py-op">:</tt> </tt>
<a name="L71"></a><tt class="py-lineno">  71</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-string">""</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">ctype</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-name">i</tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">ctype</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt id="link-4" class="py-name" targets="Variable pybindgen.module.ModuleBase.name=pybindgen.module.ModuleBase-class.html#name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-4', 'name', 'link-4');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L72"></a><tt class="py-lineno">  72</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L73"></a><tt class="py-lineno">  73</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-string">""</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">ctype</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-name">i</tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-string">' '</tt><tt class="py-op">,</tt> <tt class="py-name">ctype</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt id="link-5" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-5', 'name', 'link-4');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L74"></a><tt class="py-lineno">  74</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">ctype</tt><tt class="py-op">,</tt> <tt id="link-6" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-6', 'name', 'link-4');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L75"></a><tt class="py-lineno">  75</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L76"></a><tt class="py-lineno">  76</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">" "</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">ctype</tt><tt class="py-op">,</tt> <tt id="link-7" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-7', 'name', 'link-4');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
</div><a name="L77"></a><tt class="py-lineno">  77</tt>  <tt class="py-line"> </tt>
<a name="L78"></a><tt class="py-lineno">  78</tt>  <tt class="py-line"> </tt>
<a name="CodeBlock"></a><div id="CodeBlock-def"><a name="L79"></a><tt class="py-lineno">  79</tt> <a class="py-toggle" href="#" id="CodeBlock-toggle" onclick="return toggle('CodeBlock');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.CodeBlock-class.html">CodeBlock</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CodeBlock-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="CodeBlock-expanded"><a name="L80"></a><tt class="py-lineno">  80</tt>  <tt class="py-line">    <tt class="py-docstring">'''An intelligent code block that keeps track of cleanup actions.</tt> </tt>
<a name="L81"></a><tt class="py-lineno">  81</tt>  <tt class="py-line"><tt class="py-docstring">    This object is to be used by TypeHandlers when generating code.'''</tt> </tt>
<a name="L82"></a><tt class="py-lineno">  82</tt>  <tt class="py-line"> </tt>
<a name="CodeBlock.CleanupHandle"></a><div id="CodeBlock.CleanupHandle-def"><a name="L83"></a><tt class="py-lineno">  83</tt> <a class="py-toggle" href="#" id="CodeBlock.CleanupHandle-toggle" onclick="return toggle('CodeBlock.CleanupHandle');">-</a><tt class="py-line">    <tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.CodeBlock.CleanupHandle-class.html">CleanupHandle</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CodeBlock.CleanupHandle-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CodeBlock.CleanupHandle-expanded"><a name="L84"></a><tt class="py-lineno">  84</tt>  <tt class="py-line">        <tt class="py-docstring">"""Handle for some cleanup code"""</tt> </tt>
<a name="L85"></a><tt class="py-lineno">  85</tt>  <tt class="py-line">        <tt class="py-name">__slots__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'code_block'</tt><tt class="py-op">,</tt> <tt class="py-string">'position'</tt><tt class="py-op">]</tt> </tt>
<a name="CodeBlock.CleanupHandle.__init__"></a><div id="CodeBlock.CleanupHandle.__init__-def"><a name="L86"></a><tt class="py-lineno">  86</tt> <a class="py-toggle" href="#" id="CodeBlock.CleanupHandle.__init__-toggle" onclick="return toggle('CodeBlock.CleanupHandle.__init__');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.CodeBlock.CleanupHandle-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_block</tt><tt class="py-op">,</tt> <tt class="py-param">position</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CodeBlock.CleanupHandle.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++++++++++"></div><div id="CodeBlock.CleanupHandle.__init__-expanded"><a name="L87"></a><tt class="py-lineno">  87</tt>  <tt class="py-line">            <tt class="py-docstring">"""Create a handle given code_block and position"""</tt> </tt>
<a name="L88"></a><tt class="py-lineno">  88</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-8" class="py-name" targets="Variable pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block=pybindgen.typehandlers.base.CodeBlock.CleanupHandle-class.html#code_block"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-8', 'code_block', 'link-8');">code_block</a></tt> <tt class="py-op">=</tt> <tt id="link-9" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-9', 'code_block', 'link-8');">code_block</a></tt> </tt>
<a name="L89"></a><tt class="py-lineno">  89</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name" targets="Variable pybindgen.typehandlers.base.CodeBlock.CleanupHandle.position=pybindgen.typehandlers.base.CodeBlock.CleanupHandle-class.html#position"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.position" class="py-name" href="#" onclick="return doclink('link-10', 'position', 'link-10');">position</a></tt> <tt class="py-op">=</tt> <tt id="link-11" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.position" class="py-name" href="#" onclick="return doclink('link-11', 'position', 'link-10');">position</a></tt> </tt>
</div><a name="L90"></a><tt class="py-lineno">  90</tt>  <tt class="py-line"> </tt>
<a name="CodeBlock.CleanupHandle.__cmp__"></a><div id="CodeBlock.CleanupHandle.__cmp__-def"><a name="L91"></a><tt class="py-lineno">  91</tt> <a class="py-toggle" href="#" id="CodeBlock.CleanupHandle.__cmp__-toggle" onclick="return toggle('CodeBlock.CleanupHandle.__cmp__');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.CodeBlock.CleanupHandle-class.html#__cmp__">__cmp__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">other</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CodeBlock.CleanupHandle.__cmp__-collapsed" style="display:none;" pad="++++" indent="++++++++++++++++"></div><div id="CodeBlock.CleanupHandle.__cmp__-expanded"><a name="L92"></a><tt class="py-lineno">  92</tt>  <tt class="py-line">            <tt class="py-name">comp</tt> <tt class="py-op">=</tt> <tt class="py-name">cmp</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-12', 'code_block', 'link-8');">code_block</a></tt><tt class="py-op">,</tt> <tt class="py-name">other</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-13', 'code_block', 'link-8');">code_block</a></tt><tt class="py-op">)</tt> </tt>
<a name="L93"></a><tt class="py-lineno">  93</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">comp</tt><tt class="py-op">:</tt> </tt>
<a name="L94"></a><tt class="py-lineno">  94</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">comp</tt> </tt>
<a name="L95"></a><tt class="py-lineno">  95</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">cmp</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.position" class="py-name" href="#" onclick="return doclink('link-14', 'position', 'link-10');">position</a></tt><tt class="py-op">,</tt> <tt class="py-name">other</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.position" class="py-name" href="#" onclick="return doclink('link-15', 'position', 'link-10');">position</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L96"></a><tt class="py-lineno">  96</tt>  <tt class="py-line"> </tt>
<a name="CodeBlock.CleanupHandle.cancel"></a><div id="CodeBlock.CleanupHandle.cancel-def"><a name="L97"></a><tt class="py-lineno">  97</tt> <a class="py-toggle" href="#" id="CodeBlock.CleanupHandle.cancel-toggle" onclick="return toggle('CodeBlock.CleanupHandle.cancel');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.CodeBlock.CleanupHandle-class.html#cancel">cancel</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CodeBlock.CleanupHandle.cancel-collapsed" style="display:none;" pad="++++" indent="++++++++++++++++"></div><div id="CodeBlock.CleanupHandle.cancel-expanded"><a name="L98"></a><tt class="py-lineno">  98</tt>  <tt class="py-line">            <tt class="py-docstring">"""Cancel the cleanup code"""</tt> </tt>
<a name="L99"></a><tt class="py-lineno">  99</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-16', 'code_block', 'link-8');">code_block</a></tt><tt class="py-op">.</tt><tt id="link-17" class="py-name" targets="Method pybindgen.typehandlers.base.CodeBlock.remove_cleanup_code()=pybindgen.typehandlers.base.CodeBlock-class.html#remove_cleanup_code"><a title="pybindgen.typehandlers.base.CodeBlock.remove_cleanup_code" class="py-name" href="#" onclick="return doclink('link-17', 'remove_cleanup_code', 'link-17');">remove_cleanup_code</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
</div><a name="L100"></a><tt class="py-lineno"> 100</tt>  <tt class="py-line"> </tt>
<a name="CodeBlock.CleanupHandle.get_position"></a><div id="CodeBlock.CleanupHandle.get_position-def"><a name="L101"></a><tt class="py-lineno"> 101</tt> <a class="py-toggle" href="#" id="CodeBlock.CleanupHandle.get_position-toggle" onclick="return toggle('CodeBlock.CleanupHandle.get_position');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.CodeBlock.CleanupHandle-class.html#get_position">get_position</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CodeBlock.CleanupHandle.get_position-collapsed" style="display:none;" pad="++++" indent="++++++++++++++++"></div><div id="CodeBlock.CleanupHandle.get_position-expanded"><a name="L102"></a><tt class="py-lineno"> 102</tt>  <tt class="py-line">            <tt class="py-docstring">"returns the cleanup code relative position"</tt> </tt>
<a name="L103"></a><tt class="py-lineno"> 103</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.position" class="py-name" href="#" onclick="return doclink('link-18', 'position', 'link-10');">position</a></tt> </tt>
</div></div><a name="L104"></a><tt class="py-lineno"> 104</tt>  <tt class="py-line"> </tt>
<a name="L105"></a><tt class="py-lineno"> 105</tt>  <tt class="py-line">     </tt>
<a name="CodeBlock.__init__"></a><div id="CodeBlock.__init__-def"><a name="L106"></a><tt class="py-lineno"> 106</tt> <a class="py-toggle" href="#" id="CodeBlock.__init__-toggle" onclick="return toggle('CodeBlock.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.CodeBlock-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">error_return</tt><tt class="py-op">,</tt> <tt class="py-param">declarations</tt><tt class="py-op">,</tt> <tt class="py-param">predecessor</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CodeBlock.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CodeBlock.__init__-expanded"><a name="L107"></a><tt class="py-lineno"> 107</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L108"></a><tt class="py-lineno"> 108</tt>  <tt class="py-line"><tt class="py-docstring">        CodeBlock constructor</tt> </tt>
<a name="L109"></a><tt class="py-lineno"> 109</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L110"></a><tt class="py-lineno"> 110</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; block = CodeBlock("return NULL;", DeclarationsScope())</tt> </tt>
<a name="L111"></a><tt class="py-lineno"> 111</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; block.write_code("foo();")</tt> </tt>
<a name="L112"></a><tt class="py-lineno"> 112</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; cleanup1 = block.add_cleanup_code("clean1();")</tt> </tt>
<a name="L113"></a><tt class="py-lineno"> 113</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; cleanup2 = block.add_cleanup_code("clean2();")</tt> </tt>
<a name="L114"></a><tt class="py-lineno"> 114</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; cleanup3 = block.add_cleanup_code("clean3();")</tt> </tt>
<a name="L115"></a><tt class="py-lineno"> 115</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; cleanup2.cancel()</tt> </tt>
<a name="L116"></a><tt class="py-lineno"> 116</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; block.write_error_check("error()", "error_clean()")</tt> </tt>
<a name="L117"></a><tt class="py-lineno"> 117</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; block.write_code("bar();")</tt> </tt>
<a name="L118"></a><tt class="py-lineno"> 118</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; block.write_cleanup()</tt> </tt>
<a name="L119"></a><tt class="py-lineno"> 119</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; print block.sink.flush().rstrip()</tt> </tt>
<a name="L120"></a><tt class="py-lineno"> 120</tt>  <tt class="py-line"><tt class="py-docstring">        foo();</tt> </tt>
<a name="L121"></a><tt class="py-lineno"> 121</tt>  <tt class="py-line"><tt class="py-docstring">        if (error()) {</tt> </tt>
<a name="L122"></a><tt class="py-lineno"> 122</tt>  <tt class="py-line"><tt class="py-docstring">            error_clean()</tt> </tt>
<a name="L123"></a><tt class="py-lineno"> 123</tt>  <tt class="py-line"><tt class="py-docstring">            clean3();</tt> </tt>
<a name="L124"></a><tt class="py-lineno"> 124</tt>  <tt class="py-line"><tt class="py-docstring">            clean1();</tt> </tt>
<a name="L125"></a><tt class="py-lineno"> 125</tt>  <tt class="py-line"><tt class="py-docstring">            return NULL;</tt> </tt>
<a name="L126"></a><tt class="py-lineno"> 126</tt>  <tt class="py-line"><tt class="py-docstring">        }</tt> </tt>
<a name="L127"></a><tt class="py-lineno"> 127</tt>  <tt class="py-line"><tt class="py-docstring">        bar();</tt> </tt>
<a name="L128"></a><tt class="py-lineno"> 128</tt>  <tt class="py-line"><tt class="py-docstring">        clean3();</tt> </tt>
<a name="L129"></a><tt class="py-lineno"> 129</tt>  <tt class="py-line"><tt class="py-docstring">        clean1();</tt> </tt>
<a name="L130"></a><tt class="py-lineno"> 130</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L131"></a><tt class="py-lineno"> 131</tt>  <tt class="py-line"><tt class="py-docstring">        @param error_return: code that is generated on error conditions</tt> </tt>
<a name="L132"></a><tt class="py-lineno"> 132</tt>  <tt class="py-line"><tt class="py-docstring">                           (detected by write_error_check()); normally</tt> </tt>
<a name="L133"></a><tt class="py-lineno"> 133</tt>  <tt class="py-line"><tt class="py-docstring">                           it returns from the wrapper function,</tt> </tt>
<a name="L134"></a><tt class="py-lineno"> 134</tt>  <tt class="py-line"><tt class="py-docstring">                           e.g. return NULL;</tt> </tt>
<a name="L135"></a><tt class="py-lineno"> 135</tt>  <tt class="py-line"><tt class="py-docstring">        @param predecessor: optional predecessor code block; a</tt> </tt>
<a name="L136"></a><tt class="py-lineno"> 136</tt>  <tt class="py-line"><tt class="py-docstring">                          predecessor is used to search for additional</tt> </tt>
<a name="L137"></a><tt class="py-lineno"> 137</tt>  <tt class="py-line"><tt class="py-docstring">                          cleanup actions.        </tt> </tt>
<a name="L138"></a><tt class="py-lineno"> 138</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L139"></a><tt class="py-lineno"> 139</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">declarations</tt><tt class="py-op">,</tt> <tt id="link-19" class="py-name" targets="Class pybindgen.typehandlers.base.DeclarationsScope=pybindgen.typehandlers.base.DeclarationsScope-class.html"><a title="pybindgen.typehandlers.base.DeclarationsScope" class="py-name" href="#" onclick="return doclink('link-19', 'DeclarationsScope', 'link-19');">DeclarationsScope</a></tt><tt class="py-op">)</tt> </tt>
<a name="L140"></a><tt class="py-lineno"> 140</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">predecessor</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">predecessor</tt><tt class="py-op">,</tt> <tt id="link-20" class="py-name" targets="Class pybindgen.typehandlers.base.CodeBlock=pybindgen.typehandlers.base.CodeBlock-class.html"><a title="pybindgen.typehandlers.base.CodeBlock" class="py-name" href="#" onclick="return doclink('link-20', 'CodeBlock', 'link-20');">CodeBlock</a></tt><tt class="py-op">)</tt> </tt>
<a name="L141"></a><tt class="py-lineno"> 141</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sink</tt> <tt class="py-op">=</tt> <tt id="link-21" class="py-name"><a title="pybindgen.typehandlers.codesink" class="py-name" href="#" onclick="return doclink('link-21', 'codesink', 'link-0');">codesink</a></tt><tt class="py-op">.</tt><tt id="link-22" class="py-name" targets="Class pybindgen.typehandlers.codesink.MemoryCodeSink=pybindgen.typehandlers.codesink.MemoryCodeSink-class.html"><a title="pybindgen.typehandlers.codesink.MemoryCodeSink" class="py-name" href="#" onclick="return doclink('link-22', 'MemoryCodeSink', 'link-22');">MemoryCodeSink</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L142"></a><tt class="py-lineno"> 142</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">predecessor</tt> <tt class="py-op">=</tt> <tt class="py-name">predecessor</tt> </tt>
<a name="L143"></a><tt class="py-lineno"> 143</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_cleanup_actions</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L144"></a><tt class="py-lineno"> 144</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_last_cleanup_position</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L145"></a><tt class="py-lineno"> 145</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_return</tt> <tt class="py-op">=</tt> <tt class="py-name">error_return</tt> </tt>
<a name="L146"></a><tt class="py-lineno"> 146</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt> <tt class="py-op">=</tt> <tt class="py-name">declarations</tt> </tt>
</div><a name="L147"></a><tt class="py-lineno"> 147</tt>  <tt class="py-line"> </tt>
<a name="CodeBlock.clear"></a><div id="CodeBlock.clear-def"><a name="L148"></a><tt class="py-lineno"> 148</tt> <a class="py-toggle" href="#" id="CodeBlock.clear-toggle" onclick="return toggle('CodeBlock.clear');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.CodeBlock-class.html#clear">clear</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CodeBlock.clear-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CodeBlock.clear-expanded"><a name="L149"></a><tt class="py-lineno"> 149</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_cleanup_actions</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L150"></a><tt class="py-lineno"> 150</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_last_cleanup_position</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt>         </tt>
<a name="L151"></a><tt class="py-lineno"> 151</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sink</tt> <tt class="py-op">=</tt> <tt id="link-23" class="py-name"><a title="pybindgen.typehandlers.codesink" class="py-name" href="#" onclick="return doclink('link-23', 'codesink', 'link-0');">codesink</a></tt><tt class="py-op">.</tt><tt id="link-24" class="py-name"><a title="pybindgen.typehandlers.codesink.MemoryCodeSink" class="py-name" href="#" onclick="return doclink('link-24', 'MemoryCodeSink', 'link-22');">MemoryCodeSink</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L152"></a><tt class="py-lineno"> 152</tt>  <tt class="py-line"> </tt>
<a name="CodeBlock.declare_variable"></a><div id="CodeBlock.declare_variable-def"><a name="L153"></a><tt class="py-lineno"> 153</tt> <a class="py-toggle" href="#" id="CodeBlock.declare_variable-toggle" onclick="return toggle('CodeBlock.declare_variable');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.CodeBlock-class.html#declare_variable">declare_variable</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">type_</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">initializer</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">array</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CodeBlock.declare_variable-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CodeBlock.declare_variable-expanded"><a name="L154"></a><tt class="py-lineno"> 154</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L155"></a><tt class="py-lineno"> 155</tt>  <tt class="py-line"><tt class="py-docstring">        Calls declare_variable() on the associated DeclarationsScope object.</tt> </tt>
<a name="L156"></a><tt class="py-lineno"> 156</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L157"></a><tt class="py-lineno"> 157</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-string">':'</tt> <tt class="py-keyword">in</tt> <tt id="link-25" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-25', 'name', 'link-4');">name</a></tt><tt class="py-op">:</tt> </tt>
<a name="L158"></a><tt class="py-lineno"> 158</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"invalid variable name: %s "</tt> <tt class="py-op">%</tt> <tt id="link-26" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-26', 'name', 'link-4');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L159"></a><tt class="py-lineno"> 159</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt><tt class="py-op">.</tt><tt id="link-27" class="py-name" targets="Method pybindgen.typehandlers.base.CodeBlock.declare_variable()=pybindgen.typehandlers.base.CodeBlock-class.html#declare_variable,Method pybindgen.typehandlers.base.DeclarationsScope.declare_variable()=pybindgen.typehandlers.base.DeclarationsScope-class.html#declare_variable"><a title="pybindgen.typehandlers.base.CodeBlock.declare_variable
pybindgen.typehandlers.base.DeclarationsScope.declare_variable" class="py-name" href="#" onclick="return doclink('link-27', 'declare_variable', 'link-27');">declare_variable</a></tt><tt class="py-op">(</tt><tt class="py-name">type_</tt><tt class="py-op">,</tt> <tt id="link-28" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-28', 'name', 'link-4');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">initializer</tt><tt class="py-op">,</tt> <tt class="py-name">array</tt><tt class="py-op">)</tt> </tt>
</div><a name="L160"></a><tt class="py-lineno"> 160</tt>  <tt class="py-line">         </tt>
<a name="CodeBlock.write_code"></a><div id="CodeBlock.write_code-def"><a name="L161"></a><tt class="py-lineno"> 161</tt> <a class="py-toggle" href="#" id="CodeBlock.write_code-toggle" onclick="return toggle('CodeBlock.write_code');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.CodeBlock-class.html#write_code">write_code</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CodeBlock.write_code-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CodeBlock.write_code-expanded"><a name="L162"></a><tt class="py-lineno"> 162</tt>  <tt class="py-line">        <tt class="py-docstring">'''Write out some simple code'''</tt> </tt>
<a name="L163"></a><tt class="py-lineno"> 163</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sink</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name" targets="Method pybindgen.typehandlers.codesink.CodeSink.writeln()=pybindgen.typehandlers.codesink.CodeSink-class.html#writeln,Method pybindgen.typehandlers.codesink.FileCodeSink.writeln()=pybindgen.typehandlers.codesink.FileCodeSink-class.html#writeln,Method pybindgen.typehandlers.codesink.MemoryCodeSink.writeln()=pybindgen.typehandlers.codesink.MemoryCodeSink-class.html#writeln,Method pybindgen.typehandlers.codesink.NullCodeSink.writeln()=pybindgen.typehandlers.codesink.NullCodeSink-class.html#writeln"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-29', 'writeln', 'link-29');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-name">code</tt><tt class="py-op">)</tt> </tt>
</div><a name="L164"></a><tt class="py-lineno"> 164</tt>  <tt class="py-line"> </tt>
<a name="CodeBlock.indent"></a><div id="CodeBlock.indent-def"><a name="L165"></a><tt class="py-lineno"> 165</tt> <a class="py-toggle" href="#" id="CodeBlock.indent-toggle" onclick="return toggle('CodeBlock.indent');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.CodeBlock-class.html#indent">indent</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">level</tt><tt class="py-op">=</tt><tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CodeBlock.indent-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CodeBlock.indent-expanded"><a name="L166"></a><tt class="py-lineno"> 166</tt>  <tt class="py-line">        <tt class="py-docstring">'''Add a certain ammount of indentation to all lines written</tt> </tt>
<a name="L167"></a><tt class="py-lineno"> 167</tt>  <tt class="py-line"><tt class="py-docstring">        from now on and until unindent() is called'''</tt> </tt>
<a name="L168"></a><tt class="py-lineno"> 168</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sink</tt><tt class="py-op">.</tt><tt id="link-30" class="py-name" targets="Method pybindgen.typehandlers.base.CodeBlock.indent()=pybindgen.typehandlers.base.CodeBlock-class.html#indent,Method pybindgen.typehandlers.codesink.CodeSink.indent()=pybindgen.typehandlers.codesink.CodeSink-class.html#indent"><a title="pybindgen.typehandlers.base.CodeBlock.indent
pybindgen.typehandlers.codesink.CodeSink.indent" class="py-name" href="#" onclick="return doclink('link-30', 'indent', 'link-30');">indent</a></tt><tt class="py-op">(</tt><tt class="py-name">level</tt><tt class="py-op">)</tt> </tt>
</div><a name="L169"></a><tt class="py-lineno"> 169</tt>  <tt class="py-line"> </tt>
<a name="CodeBlock.unindent"></a><div id="CodeBlock.unindent-def"><a name="L170"></a><tt class="py-lineno"> 170</tt> <a class="py-toggle" href="#" id="CodeBlock.unindent-toggle" onclick="return toggle('CodeBlock.unindent');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.CodeBlock-class.html#unindent">unindent</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CodeBlock.unindent-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CodeBlock.unindent-expanded"><a name="L171"></a><tt class="py-lineno"> 171</tt>  <tt class="py-line">        <tt class="py-docstring">'''Revert indentation level to the value before last indent() call'''</tt> </tt>
<a name="L172"></a><tt class="py-lineno"> 172</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sink</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name" targets="Method pybindgen.typehandlers.base.CodeBlock.unindent()=pybindgen.typehandlers.base.CodeBlock-class.html#unindent,Method pybindgen.typehandlers.codesink.CodeSink.unindent()=pybindgen.typehandlers.codesink.CodeSink-class.html#unindent"><a title="pybindgen.typehandlers.base.CodeBlock.unindent
pybindgen.typehandlers.codesink.CodeSink.unindent" class="py-name" href="#" onclick="return doclink('link-31', 'unindent', 'link-31');">unindent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L173"></a><tt class="py-lineno"> 173</tt>  <tt class="py-line"> </tt>
<a name="CodeBlock.add_cleanup_code"></a><div id="CodeBlock.add_cleanup_code-def"><a name="L174"></a><tt class="py-lineno"> 174</tt> <a class="py-toggle" href="#" id="CodeBlock.add_cleanup_code-toggle" onclick="return toggle('CodeBlock.add_cleanup_code');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.CodeBlock-class.html#add_cleanup_code">add_cleanup_code</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">cleanup_code</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CodeBlock.add_cleanup_code-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CodeBlock.add_cleanup_code-expanded"><a name="L175"></a><tt class="py-lineno"> 175</tt>  <tt class="py-line">        <tt class="py-docstring">'''Add a chunk of code used to cleanup previously allocated resources</tt> </tt>
<a name="L176"></a><tt class="py-lineno"> 176</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L177"></a><tt class="py-lineno"> 177</tt>  <tt class="py-line"><tt class="py-docstring">        Returns a handle used to cancel the cleanup code</tt> </tt>
<a name="L178"></a><tt class="py-lineno"> 178</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L179"></a><tt class="py-lineno"> 179</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_last_cleanup_position</tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
<a name="L180"></a><tt class="py-lineno"> 180</tt>  <tt class="py-line">        <tt class="py-name">handle</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-32" class="py-name" targets="Class pybindgen.typehandlers.base.CodeBlock.CleanupHandle=pybindgen.typehandlers.base.CodeBlock.CleanupHandle-class.html"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle" class="py-name" href="#" onclick="return doclink('link-32', 'CleanupHandle', 'link-32');">CleanupHandle</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_last_cleanup_position</tt><tt class="py-op">)</tt> </tt>
<a name="L181"></a><tt class="py-lineno"> 181</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_cleanup_actions</tt><tt class="py-op">[</tt><tt class="py-name">handle</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name" targets="Method pybindgen.typehandlers.base.CodeBlock.CleanupHandle.get_position()=pybindgen.typehandlers.base.CodeBlock.CleanupHandle-class.html#get_position"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.get_position" class="py-name" href="#" onclick="return doclink('link-33', 'get_position', 'link-33');">get_position</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">cleanup_code</tt> </tt>
<a name="L182"></a><tt class="py-lineno"> 182</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">handle</tt> </tt>
</div><a name="L183"></a><tt class="py-lineno"> 183</tt>  <tt class="py-line"> </tt>
<a name="CodeBlock.remove_cleanup_code"></a><div id="CodeBlock.remove_cleanup_code-def"><a name="L184"></a><tt class="py-lineno"> 184</tt> <a class="py-toggle" href="#" id="CodeBlock.remove_cleanup_code-toggle" onclick="return toggle('CodeBlock.remove_cleanup_code');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.CodeBlock-class.html#remove_cleanup_code">remove_cleanup_code</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">handle</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CodeBlock.remove_cleanup_code-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CodeBlock.remove_cleanup_code-expanded"><a name="L185"></a><tt class="py-lineno"> 185</tt>  <tt class="py-line">        <tt class="py-docstring">'''Remove cleanup code previously added with add_cleanup_code()</tt> </tt>
<a name="L186"></a><tt class="py-lineno"> 186</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L187"></a><tt class="py-lineno"> 187</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">handle</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle" class="py-name" href="#" onclick="return doclink('link-34', 'CleanupHandle', 'link-32');">CleanupHandle</a></tt><tt class="py-op">)</tt> </tt>
<a name="L188"></a><tt class="py-lineno"> 188</tt>  <tt class="py-line">        <tt class="py-keyword">del</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_cleanup_actions</tt><tt class="py-op">[</tt><tt class="py-name">handle</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.get_position" class="py-name" href="#" onclick="return doclink('link-35', 'get_position', 'link-33');">get_position</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
</div><a name="L189"></a><tt class="py-lineno"> 189</tt>  <tt class="py-line"> </tt>
<a name="CodeBlock.get_cleanup_code"></a><div id="CodeBlock.get_cleanup_code-def"><a name="L190"></a><tt class="py-lineno"> 190</tt> <a class="py-toggle" href="#" id="CodeBlock.get_cleanup_code-toggle" onclick="return toggle('CodeBlock.get_cleanup_code');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.CodeBlock-class.html#get_cleanup_code">get_cleanup_code</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CodeBlock.get_cleanup_code-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CodeBlock.get_cleanup_code-expanded"><a name="L191"></a><tt class="py-lineno"> 191</tt>  <tt class="py-line">        <tt class="py-docstring">'''return a new list with all cleanup actions, including the</tt> </tt>
<a name="L192"></a><tt class="py-lineno"> 192</tt>  <tt class="py-line"><tt class="py-docstring">        ones from predecessor code blocks; Note: cleanup actions are</tt> </tt>
<a name="L193"></a><tt class="py-lineno"> 193</tt>  <tt class="py-line"><tt class="py-docstring">        executed in reverse order than when they were added.'''</tt> </tt>
<a name="L194"></a><tt class="py-lineno"> 194</tt>  <tt class="py-line">        <tt class="py-name">cleanup</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L195"></a><tt class="py-lineno"> 195</tt>  <tt class="py-line">        <tt id="link-36" class="py-name" targets="Method pybindgen.typehandlers.base.TypeMatcher.items()=pybindgen.typehandlers.base.TypeMatcher-class.html#items"><a title="pybindgen.typehandlers.base.TypeMatcher.items" class="py-name" href="#" onclick="return doclink('link-36', 'items', 'link-36');">items</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_cleanup_actions</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name"><a title="pybindgen.typehandlers.base.TypeMatcher.items" class="py-name" href="#" onclick="return doclink('link-37', 'items', 'link-36');">items</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L196"></a><tt class="py-lineno"> 196</tt>  <tt class="py-line">        <tt id="link-38" class="py-name"><a title="pybindgen.typehandlers.base.TypeMatcher.items" class="py-name" href="#" onclick="return doclink('link-38', 'items', 'link-36');">items</a></tt><tt class="py-op">.</tt><tt class="py-name">sort</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L197"></a><tt class="py-lineno"> 197</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">dummy</tt><tt class="py-op">,</tt> <tt class="py-name">code</tt> <tt class="py-keyword">in</tt> <tt id="link-39" class="py-name"><a title="pybindgen.typehandlers.base.TypeMatcher.items" class="py-name" href="#" onclick="return doclink('link-39', 'items', 'link-36');">items</a></tt><tt class="py-op">:</tt> </tt>
<a name="L198"></a><tt class="py-lineno"> 198</tt>  <tt class="py-line">            <tt class="py-name">cleanup</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">code</tt><tt class="py-op">)</tt> </tt>
<a name="L199"></a><tt class="py-lineno"> 199</tt>  <tt class="py-line">        <tt class="py-name">cleanup</tt><tt class="py-op">.</tt><tt class="py-name">reverse</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L200"></a><tt class="py-lineno"> 200</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">predecessor</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L201"></a><tt class="py-lineno"> 201</tt>  <tt class="py-line">            <tt class="py-name">cleanup</tt><tt class="py-op">.</tt><tt class="py-name">extend</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">predecessor</tt><tt class="py-op">.</tt><tt id="link-40" class="py-name" targets="Method pybindgen.typehandlers.base.CodeBlock.get_cleanup_code()=pybindgen.typehandlers.base.CodeBlock-class.html#get_cleanup_code"><a title="pybindgen.typehandlers.base.CodeBlock.get_cleanup_code" class="py-name" href="#" onclick="return doclink('link-40', 'get_cleanup_code', 'link-40');">get_cleanup_code</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L202"></a><tt class="py-lineno"> 202</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">cleanup</tt> </tt>
</div><a name="L203"></a><tt class="py-lineno"> 203</tt>  <tt class="py-line"> </tt>
<a name="CodeBlock.write_error_check"></a><div id="CodeBlock.write_error_check-def"><a name="L204"></a><tt class="py-lineno"> 204</tt> <a class="py-toggle" href="#" id="CodeBlock.write_error_check-toggle" onclick="return toggle('CodeBlock.write_error_check');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.CodeBlock-class.html#write_error_check">write_error_check</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">failure_expression</tt><tt class="py-op">,</tt> <tt class="py-param">failure_cleanup</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CodeBlock.write_error_check-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CodeBlock.write_error_check-expanded"><a name="L205"></a><tt class="py-lineno"> 205</tt>  <tt class="py-line">        <tt class="py-docstring">'''Add a chunk of code that checks for a possible error</tt> </tt>
<a name="L206"></a><tt class="py-lineno"> 206</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L207"></a><tt class="py-lineno"> 207</tt>  <tt class="py-line"><tt class="py-docstring">        @param failure_expression: C boolean expression that is true when</tt> </tt>
<a name="L208"></a><tt class="py-lineno"> 208</tt>  <tt class="py-line"><tt class="py-docstring">                              an error occurred</tt> </tt>
<a name="L209"></a><tt class="py-lineno"> 209</tt>  <tt class="py-line"><tt class="py-docstring">        @param failure_cleanup: optional extra cleanup code to write only</tt> </tt>
<a name="L210"></a><tt class="py-lineno"> 210</tt>  <tt class="py-line"><tt class="py-docstring">                           for the the case when failure_expression is</tt> </tt>
<a name="L211"></a><tt class="py-lineno"> 211</tt>  <tt class="py-line"><tt class="py-docstring">                           true; this extra cleanup code comes before</tt> </tt>
<a name="L212"></a><tt class="py-lineno"> 212</tt>  <tt class="py-line"><tt class="py-docstring">                           all other cleanup code previously registered.</tt> </tt>
<a name="L213"></a><tt class="py-lineno"> 213</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L214"></a><tt class="py-lineno"> 214</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sink</tt><tt class="py-op">.</tt><tt id="link-41" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-41', 'writeln', 'link-29');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"if (%s) {"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">failure_expression</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L215"></a><tt class="py-lineno"> 215</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sink</tt><tt class="py-op">.</tt><tt id="link-42" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.indent
pybindgen.typehandlers.codesink.CodeSink.indent" class="py-name" href="#" onclick="return doclink('link-42', 'indent', 'link-30');">indent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L216"></a><tt class="py-lineno"> 216</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">failure_cleanup</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L217"></a><tt class="py-lineno"> 217</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sink</tt><tt class="py-op">.</tt><tt id="link-43" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-43', 'writeln', 'link-29');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-name">failure_cleanup</tt><tt class="py-op">)</tt> </tt>
<a name="L218"></a><tt class="py-lineno"> 218</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-44" class="py-name" targets="Method pybindgen.typehandlers.base.CodeBlock.write_error_return()=pybindgen.typehandlers.base.CodeBlock-class.html#write_error_return"><a title="pybindgen.typehandlers.base.CodeBlock.write_error_return" class="py-name" href="#" onclick="return doclink('link-44', 'write_error_return', 'link-44');">write_error_return</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L219"></a><tt class="py-lineno"> 219</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sink</tt><tt class="py-op">.</tt><tt id="link-45" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.unindent
pybindgen.typehandlers.codesink.CodeSink.unindent" class="py-name" href="#" onclick="return doclink('link-45', 'unindent', 'link-31');">unindent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L220"></a><tt class="py-lineno"> 220</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sink</tt><tt class="py-op">.</tt><tt id="link-46" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-46', 'writeln', 'link-29');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"}"</tt><tt class="py-op">)</tt> </tt>
</div><a name="L221"></a><tt class="py-lineno"> 221</tt>  <tt class="py-line"> </tt>
<a name="CodeBlock.write_cleanup"></a><div id="CodeBlock.write_cleanup-def"><a name="L222"></a><tt class="py-lineno"> 222</tt> <a class="py-toggle" href="#" id="CodeBlock.write_cleanup-toggle" onclick="return toggle('CodeBlock.write_cleanup');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.CodeBlock-class.html#write_cleanup">write_cleanup</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CodeBlock.write_cleanup-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CodeBlock.write_cleanup-expanded"><a name="L223"></a><tt class="py-lineno"> 223</tt>  <tt class="py-line">        <tt class="py-docstring">"""Write the current cleanup code."""</tt> </tt>
<a name="L224"></a><tt class="py-lineno"> 224</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">cleanup_action</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-47" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.get_cleanup_code" class="py-name" href="#" onclick="return doclink('link-47', 'get_cleanup_code', 'link-40');">get_cleanup_code</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L225"></a><tt class="py-lineno"> 225</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sink</tt><tt class="py-op">.</tt><tt id="link-48" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-48', 'writeln', 'link-29');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-name">cleanup_action</tt><tt class="py-op">)</tt> </tt>
</div><a name="L226"></a><tt class="py-lineno"> 226</tt>  <tt class="py-line"> </tt>
<a name="CodeBlock.write_error_return"></a><div id="CodeBlock.write_error_return-def"><a name="L227"></a><tt class="py-lineno"> 227</tt> <a class="py-toggle" href="#" id="CodeBlock.write_error_return-toggle" onclick="return toggle('CodeBlock.write_error_return');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.CodeBlock-class.html#write_error_return">write_error_return</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CodeBlock.write_error_return-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CodeBlock.write_error_return-expanded"><a name="L228"></a><tt class="py-lineno"> 228</tt>  <tt class="py-line">        <tt class="py-docstring">'''Add a chunk of code that cleans up and returns an error.</tt> </tt>
<a name="L229"></a><tt class="py-lineno"> 229</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L230"></a><tt class="py-lineno"> 230</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-49" class="py-name" targets="Method pybindgen.typehandlers.base.CodeBlock.write_cleanup()=pybindgen.typehandlers.base.CodeBlock-class.html#write_cleanup"><a title="pybindgen.typehandlers.base.CodeBlock.write_cleanup" class="py-name" href="#" onclick="return doclink('link-49', 'write_cleanup', 'link-49');">write_cleanup</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L231"></a><tt class="py-lineno"> 231</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sink</tt><tt class="py-op">.</tt><tt id="link-50" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-50', 'writeln', 'link-29');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_return</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L232"></a><tt class="py-lineno"> 232</tt>  <tt class="py-line"> </tt>
<a name="L233"></a><tt class="py-lineno"> 233</tt>  <tt class="py-line"> </tt>
<a name="L234"></a><tt class="py-lineno"> 234</tt>  <tt class="py-line"> </tt>
<a name="ParseTupleParameters"></a><div id="ParseTupleParameters-def"><a name="L235"></a><tt class="py-lineno"> 235</tt> <a class="py-toggle" href="#" id="ParseTupleParameters-toggle" onclick="return toggle('ParseTupleParameters');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ParseTupleParameters-class.html">ParseTupleParameters</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ParseTupleParameters-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="ParseTupleParameters-expanded"><a name="L236"></a><tt class="py-lineno"> 236</tt>  <tt class="py-line">    <tt class="py-docstring">"Object to keep track of PyArg_ParseTuple (or similar) parameters"</tt> </tt>
<a name="L237"></a><tt class="py-lineno"> 237</tt>  <tt class="py-line"> </tt>
<a name="ParseTupleParameters.__init__"></a><div id="ParseTupleParameters.__init__-def"><a name="L238"></a><tt class="py-lineno"> 238</tt> <a class="py-toggle" href="#" id="ParseTupleParameters.__init__-toggle" onclick="return toggle('ParseTupleParameters.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ParseTupleParameters-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ParseTupleParameters.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ParseTupleParameters.__init__-expanded"><a name="L239"></a><tt class="py-lineno"> 239</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L240"></a><tt class="py-lineno"> 240</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; tuple_params = ParseTupleParameters()</tt> </tt>
<a name="L241"></a><tt class="py-lineno"> 241</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; tuple_params.add_parameter('i', ['&amp;foo'], 'foo')</tt> </tt>
<a name="L242"></a><tt class="py-lineno"> 242</tt>  <tt class="py-line"><tt class="py-docstring">        1</tt> </tt>
<a name="L243"></a><tt class="py-lineno"> 243</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; tuple_params.add_parameter('s', ['&amp;bar'], 'bar', optional=True)</tt> </tt>
<a name="L244"></a><tt class="py-lineno"> 244</tt>  <tt class="py-line"><tt class="py-docstring">        2</tt> </tt>
<a name="L245"></a><tt class="py-lineno"> 245</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; tuple_params.get_parameters()</tt> </tt>
<a name="L246"></a><tt class="py-lineno"> 246</tt>  <tt class="py-line"><tt class="py-docstring">        ['"i|s"', '&amp;foo', '&amp;bar']</tt> </tt>
<a name="L247"></a><tt class="py-lineno"> 247</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; tuple_params.get_keywords()</tt> </tt>
<a name="L248"></a><tt class="py-lineno"> 248</tt>  <tt class="py-line"><tt class="py-docstring">        ['foo', 'bar']</tt> </tt>
<a name="L249"></a><tt class="py-lineno"> 249</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L250"></a><tt class="py-lineno"> 250</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; tuple_params = ParseTupleParameters()</tt> </tt>
<a name="L251"></a><tt class="py-lineno"> 251</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; tuple_params.add_parameter('i', ['&amp;foo'], 'foo')</tt> </tt>
<a name="L252"></a><tt class="py-lineno"> 252</tt>  <tt class="py-line"><tt class="py-docstring">        1</tt> </tt>
<a name="L253"></a><tt class="py-lineno"> 253</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; tuple_params.add_parameter('s', ['&amp;bar'], 'bar', prepend=True)</tt> </tt>
<a name="L254"></a><tt class="py-lineno"> 254</tt>  <tt class="py-line"><tt class="py-docstring">        2</tt> </tt>
<a name="L255"></a><tt class="py-lineno"> 255</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; tuple_params.get_parameters()</tt> </tt>
<a name="L256"></a><tt class="py-lineno"> 256</tt>  <tt class="py-line"><tt class="py-docstring">        ['"si"', '&amp;bar', '&amp;foo']</tt> </tt>
<a name="L257"></a><tt class="py-lineno"> 257</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; tuple_params.get_keywords()</tt> </tt>
<a name="L258"></a><tt class="py-lineno"> 258</tt>  <tt class="py-line"><tt class="py-docstring">        ['bar', 'foo']</tt> </tt>
<a name="L259"></a><tt class="py-lineno"> 259</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L260"></a><tt class="py-lineno"> 260</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; tuple_params = ParseTupleParameters()</tt> </tt>
<a name="L261"></a><tt class="py-lineno"> 261</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; tuple_params.add_parameter('i', ['&amp;foo'])</tt> </tt>
<a name="L262"></a><tt class="py-lineno"> 262</tt>  <tt class="py-line"><tt class="py-docstring">        1</tt> </tt>
<a name="L263"></a><tt class="py-lineno"> 263</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; print tuple_params.get_keywords()</tt> </tt>
<a name="L264"></a><tt class="py-lineno"> 264</tt>  <tt class="py-line"><tt class="py-docstring">        None</tt> </tt>
<a name="L265"></a><tt class="py-lineno"> 265</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L266"></a><tt class="py-lineno"> 266</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_parse_tuple_items</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> <tt class="py-comment"># (template, param_values, param_name, optional)</tt> </tt>
</div><a name="L267"></a><tt class="py-lineno"> 267</tt>  <tt class="py-line"> </tt>
<a name="ParseTupleParameters.clear"></a><div id="ParseTupleParameters.clear-def"><a name="L268"></a><tt class="py-lineno"> 268</tt> <a class="py-toggle" href="#" id="ParseTupleParameters.clear-toggle" onclick="return toggle('ParseTupleParameters.clear');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ParseTupleParameters-class.html#clear">clear</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ParseTupleParameters.clear-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ParseTupleParameters.clear-expanded"><a name="L269"></a><tt class="py-lineno"> 269</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_parse_tuple_items</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
</div><a name="L270"></a><tt class="py-lineno"> 270</tt>  <tt class="py-line">         </tt>
<a name="ParseTupleParameters.add_parameter"></a><div id="ParseTupleParameters.add_parameter-def"><a name="L271"></a><tt class="py-lineno"> 271</tt> <a class="py-toggle" href="#" id="ParseTupleParameters.add_parameter-toggle" onclick="return toggle('ParseTupleParameters.add_parameter');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ParseTupleParameters-class.html#add_parameter">add_parameter</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">param_template</tt><tt class="py-op">,</tt> <tt class="py-param">param_values</tt><tt class="py-op">,</tt> <tt class="py-param">param_name</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L272"></a><tt class="py-lineno"> 272</tt>  <tt class="py-line">                      <tt class="py-param">prepend</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-param">optional</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ParseTupleParameters.add_parameter-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ParseTupleParameters.add_parameter-expanded"><a name="L273"></a><tt class="py-lineno"> 273</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L274"></a><tt class="py-lineno"> 274</tt>  <tt class="py-line"><tt class="py-docstring">        Adds a new parameter specification</tt> </tt>
<a name="L275"></a><tt class="py-lineno"> 275</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L276"></a><tt class="py-lineno"> 276</tt>  <tt class="py-line"><tt class="py-docstring">        @param param_template: template item, see documentation for</tt> </tt>
<a name="L277"></a><tt class="py-lineno"> 277</tt>  <tt class="py-line"><tt class="py-docstring">                          PyArg_ParseTuple for more information</tt> </tt>
<a name="L278"></a><tt class="py-lineno"> 278</tt>  <tt class="py-line"><tt class="py-docstring">        @param param_values: list of parameters, see documentation</tt> </tt>
<a name="L279"></a><tt class="py-lineno"> 279</tt>  <tt class="py-line"><tt class="py-docstring">                       for PyArg_ParseTuple for more information</tt> </tt>
<a name="L280"></a><tt class="py-lineno"> 280</tt>  <tt class="py-line"><tt class="py-docstring">        @param prepend: whether this parameter should be parsed first</tt> </tt>
<a name="L281"></a><tt class="py-lineno"> 281</tt>  <tt class="py-line"><tt class="py-docstring">        @param optional: whether the parameter is optional; note that after</tt> </tt>
<a name="L282"></a><tt class="py-lineno"> 282</tt>  <tt class="py-line"><tt class="py-docstring">                    the first optional parameter, all remaining</tt> </tt>
<a name="L283"></a><tt class="py-lineno"> 283</tt>  <tt class="py-line"><tt class="py-docstring">                    parameters must also be optional</tt> </tt>
<a name="L284"></a><tt class="py-lineno"> 284</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L285"></a><tt class="py-lineno"> 285</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">param_values</tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">)</tt> </tt>
<a name="L286"></a><tt class="py-lineno"> 286</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">param_template</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt> </tt>
<a name="L287"></a><tt class="py-lineno"> 287</tt>  <tt class="py-line">        <tt class="py-name">item</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">param_template</tt><tt class="py-op">,</tt> <tt class="py-name">param_values</tt><tt class="py-op">,</tt> <tt class="py-name">param_name</tt><tt class="py-op">,</tt> <tt class="py-name">optional</tt><tt class="py-op">)</tt> </tt>
<a name="L288"></a><tt class="py-lineno"> 288</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">prepend</tt><tt class="py-op">:</tt> </tt>
<a name="L289"></a><tt class="py-lineno"> 289</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_parse_tuple_items</tt><tt class="py-op">.</tt><tt class="py-name">insert</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
<a name="L290"></a><tt class="py-lineno"> 290</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L291"></a><tt class="py-lineno"> 291</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_parse_tuple_items</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
<a name="L292"></a><tt class="py-lineno"> 292</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_parse_tuple_items</tt><tt class="py-op">)</tt> </tt>
</div><a name="L293"></a><tt class="py-lineno"> 293</tt>  <tt class="py-line"> </tt>
<a name="ParseTupleParameters.is_empty"></a><div id="ParseTupleParameters.is_empty-def"><a name="L294"></a><tt class="py-lineno"> 294</tt> <a class="py-toggle" href="#" id="ParseTupleParameters.is_empty-toggle" onclick="return toggle('ParseTupleParameters.is_empty');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ParseTupleParameters-class.html#is_empty">is_empty</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ParseTupleParameters.is_empty-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ParseTupleParameters.is_empty-expanded"><a name="L295"></a><tt class="py-lineno"> 295</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-51" class="py-name" targets="Method pybindgen.typehandlers.base.BuildValueParameters.get_parameters()=pybindgen.typehandlers.base.BuildValueParameters-class.html#get_parameters,Method pybindgen.typehandlers.base.ParseTupleParameters.get_parameters()=pybindgen.typehandlers.base.ParseTupleParameters-class.html#get_parameters"><a title="pybindgen.typehandlers.base.BuildValueParameters.get_parameters
pybindgen.typehandlers.base.ParseTupleParameters.get_parameters" class="py-name" href="#" onclick="return doclink('link-51', 'get_parameters', 'link-51');">get_parameters</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-op">[</tt><tt class="py-string">'""'</tt><tt class="py-op">]</tt> </tt>
</div><a name="L296"></a><tt class="py-lineno"> 296</tt>  <tt class="py-line"> </tt>
<a name="ParseTupleParameters.get_parameters"></a><div id="ParseTupleParameters.get_parameters-def"><a name="L297"></a><tt class="py-lineno"> 297</tt> <a class="py-toggle" href="#" id="ParseTupleParameters.get_parameters-toggle" onclick="return toggle('ParseTupleParameters.get_parameters');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ParseTupleParameters-class.html#get_parameters">get_parameters</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ParseTupleParameters.get_parameters-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ParseTupleParameters.get_parameters-expanded"><a name="L298"></a><tt class="py-lineno"> 298</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L299"></a><tt class="py-lineno"> 299</tt>  <tt class="py-line"><tt class="py-docstring">        returns a list of parameters to pass into a</tt> </tt>
<a name="L300"></a><tt class="py-lineno"> 300</tt>  <tt class="py-line"><tt class="py-docstring">        PyArg_ParseTuple-style function call, the first paramter in</tt> </tt>
<a name="L301"></a><tt class="py-lineno"> 301</tt>  <tt class="py-line"><tt class="py-docstring">        the list being the template string.</tt> </tt>
<a name="L302"></a><tt class="py-lineno"> 302</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L303"></a><tt class="py-lineno"> 303</tt>  <tt class="py-line">        <tt class="py-name">template</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'"'</tt><tt class="py-op">]</tt> </tt>
<a name="L304"></a><tt class="py-lineno"> 304</tt>  <tt class="py-line">        <tt class="py-name">last_was_optional</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L305"></a><tt class="py-lineno"> 305</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">param_template</tt><tt class="py-op">,</tt> <tt class="py-name">dummy</tt><tt class="py-op">,</tt> </tt>
<a name="L306"></a><tt class="py-lineno"> 306</tt>  <tt class="py-line">             <tt class="py-name">dummy</tt><tt class="py-op">,</tt> <tt class="py-name">optional</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_parse_tuple_items</tt><tt class="py-op">:</tt> </tt>
<a name="L307"></a><tt class="py-lineno"> 307</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt class="py-name">last_was_optional</tt> <tt class="py-keyword">and</tt> <tt class="py-name">optional</tt> <tt class="py-keyword">or</tt> <tt class="py-keyword">not</tt> <tt class="py-name">last_was_optional</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L308"></a><tt class="py-lineno"> 308</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"Error: optional parameter followed by a non-optional one"</tt> </tt>
<a name="L309"></a><tt class="py-lineno"> 309</tt>  <tt class="py-line">                                 <tt class="py-string">" (debug: self._parse_tuple_parameters=%r)"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_parse_tuple_items</tt><tt class="py-op">)</tt> </tt>
<a name="L310"></a><tt class="py-lineno"> 310</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">last_was_optional</tt> <tt class="py-keyword">and</tt> <tt class="py-name">optional</tt><tt class="py-op">:</tt> </tt>
<a name="L311"></a><tt class="py-lineno"> 311</tt>  <tt class="py-line">                <tt class="py-name">template</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">'|'</tt><tt class="py-op">)</tt> </tt>
<a name="L312"></a><tt class="py-lineno"> 312</tt>  <tt class="py-line">            <tt class="py-name">last_was_optional</tt> <tt class="py-op">=</tt> <tt class="py-name">optional</tt> </tt>
<a name="L313"></a><tt class="py-lineno"> 313</tt>  <tt class="py-line">            <tt class="py-name">template</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">param_template</tt><tt class="py-op">)</tt> </tt>
<a name="L314"></a><tt class="py-lineno"> 314</tt>  <tt class="py-line">        <tt class="py-name">template</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">'"'</tt><tt class="py-op">)</tt> </tt>
<a name="L315"></a><tt class="py-lineno"> 315</tt>  <tt class="py-line">        <tt class="py-name">params</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">template</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L316"></a><tt class="py-lineno"> 316</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">dummy</tt><tt class="py-op">,</tt> <tt class="py-name">param_values</tt><tt class="py-op">,</tt> </tt>
<a name="L317"></a><tt class="py-lineno"> 317</tt>  <tt class="py-line">             <tt class="py-name">dummy</tt><tt class="py-op">,</tt> <tt class="py-name">dummy</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_parse_tuple_items</tt><tt class="py-op">:</tt> </tt>
<a name="L318"></a><tt class="py-lineno"> 318</tt>  <tt class="py-line">            <tt class="py-name">params</tt><tt class="py-op">.</tt><tt class="py-name">extend</tt><tt class="py-op">(</tt><tt class="py-name">param_values</tt><tt class="py-op">)</tt> </tt>
<a name="L319"></a><tt class="py-lineno"> 319</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">params</tt> </tt>
</div><a name="L320"></a><tt class="py-lineno"> 320</tt>  <tt class="py-line">         </tt>
<a name="ParseTupleParameters.get_keywords"></a><div id="ParseTupleParameters.get_keywords-def"><a name="L321"></a><tt class="py-lineno"> 321</tt> <a class="py-toggle" href="#" id="ParseTupleParameters.get_keywords-toggle" onclick="return toggle('ParseTupleParameters.get_keywords');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ParseTupleParameters-class.html#get_keywords">get_keywords</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ParseTupleParameters.get_keywords-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ParseTupleParameters.get_keywords-expanded"><a name="L322"></a><tt class="py-lineno"> 322</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L323"></a><tt class="py-lineno"> 323</tt>  <tt class="py-line"><tt class="py-docstring">        returns list of keywords (parameter names), or None if none of</tt> </tt>
<a name="L324"></a><tt class="py-lineno"> 324</tt>  <tt class="py-line"><tt class="py-docstring">        the parameters had a name; should only be called if names were</tt> </tt>
<a name="L325"></a><tt class="py-lineno"> 325</tt>  <tt class="py-line"><tt class="py-docstring">        given for all parameters or none of them.</tt> </tt>
<a name="L326"></a><tt class="py-lineno"> 326</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L327"></a><tt class="py-lineno"> 327</tt>  <tt class="py-line">        <tt class="py-name">keywords</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L328"></a><tt class="py-lineno"> 328</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">dummy</tt><tt class="py-op">,</tt> <tt class="py-name">dummy</tt><tt class="py-op">,</tt> <tt id="link-52" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-52', 'name', 'link-4');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">dummy</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_parse_tuple_items</tt><tt class="py-op">:</tt> </tt>
<a name="L329"></a><tt class="py-lineno"> 329</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-53" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-53', 'name', 'link-4');">name</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L330"></a><tt class="py-lineno"> 330</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">keywords</tt><tt class="py-op">:</tt> </tt>
<a name="L331"></a><tt class="py-lineno"> 331</tt>  <tt class="py-line">                    <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"mixing parameters with and without keywords"</tt><tt class="py-op">)</tt> </tt>
<a name="L332"></a><tt class="py-lineno"> 332</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L333"></a><tt class="py-lineno"> 333</tt>  <tt class="py-line">                <tt class="py-name">keywords</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt id="link-54" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-54', 'name', 'link-4');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L334"></a><tt class="py-lineno"> 334</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">keywords</tt><tt class="py-op">:</tt> </tt>
<a name="L335"></a><tt class="py-lineno"> 335</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">keywords</tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_parse_tuple_items</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L336"></a><tt class="py-lineno"> 336</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"mixing parameters with and without keywords"</tt><tt class="py-op">)</tt> </tt>
<a name="L337"></a><tt class="py-lineno"> 337</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">keywords</tt> </tt>
<a name="L338"></a><tt class="py-lineno"> 338</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L339"></a><tt class="py-lineno"> 339</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div></div><a name="L340"></a><tt class="py-lineno"> 340</tt>  <tt class="py-line"> </tt>
<a name="L341"></a><tt class="py-lineno"> 341</tt>  <tt class="py-line"> </tt>
<a name="BuildValueParameters"></a><div id="BuildValueParameters-def"><a name="L342"></a><tt class="py-lineno"> 342</tt> <a class="py-toggle" href="#" id="BuildValueParameters-toggle" onclick="return toggle('BuildValueParameters');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.BuildValueParameters-class.html">BuildValueParameters</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BuildValueParameters-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="BuildValueParameters-expanded"><a name="L343"></a><tt class="py-lineno"> 343</tt>  <tt class="py-line">    <tt class="py-docstring">"Object to keep track of Py_BuildValue (or similar) parameters"</tt> </tt>
<a name="L344"></a><tt class="py-lineno"> 344</tt>  <tt class="py-line"> </tt>
<a name="BuildValueParameters.__init__"></a><div id="BuildValueParameters.__init__-def"><a name="L345"></a><tt class="py-lineno"> 345</tt> <a class="py-toggle" href="#" id="BuildValueParameters.__init__-toggle" onclick="return toggle('BuildValueParameters.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.BuildValueParameters-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BuildValueParameters.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="BuildValueParameters.__init__-expanded"><a name="L346"></a><tt class="py-lineno"> 346</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L347"></a><tt class="py-lineno"> 347</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; bld = BuildValueParameters()</tt> </tt>
<a name="L348"></a><tt class="py-lineno"> 348</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; bld.add_parameter('i', [123, 456])</tt> </tt>
<a name="L349"></a><tt class="py-lineno"> 349</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; bld.add_parameter('s', ["hello"])</tt> </tt>
<a name="L350"></a><tt class="py-lineno"> 350</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; bld.get_parameters()</tt> </tt>
<a name="L351"></a><tt class="py-lineno"> 351</tt>  <tt class="py-line"><tt class="py-docstring">        ['"is"', 123, 456, 'hello']</tt> </tt>
<a name="L352"></a><tt class="py-lineno"> 352</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; bld = BuildValueParameters()</tt> </tt>
<a name="L353"></a><tt class="py-lineno"> 353</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; bld.add_parameter('i', [123])</tt> </tt>
<a name="L354"></a><tt class="py-lineno"> 354</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; bld.add_parameter('s', ["hello"], prepend=True)</tt> </tt>
<a name="L355"></a><tt class="py-lineno"> 355</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; bld.get_parameters()</tt> </tt>
<a name="L356"></a><tt class="py-lineno"> 356</tt>  <tt class="py-line"><tt class="py-docstring">        ['"si"', 'hello', 123]</tt> </tt>
<a name="L357"></a><tt class="py-lineno"> 357</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L358"></a><tt class="py-lineno"> 358</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_build_value_items</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> <tt class="py-comment"># (template, param_value, cleanup_handle)</tt> </tt>
</div><a name="L359"></a><tt class="py-lineno"> 359</tt>  <tt class="py-line"> </tt>
<a name="BuildValueParameters.clear"></a><div id="BuildValueParameters.clear-def"><a name="L360"></a><tt class="py-lineno"> 360</tt> <a class="py-toggle" href="#" id="BuildValueParameters.clear-toggle" onclick="return toggle('BuildValueParameters.clear');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.BuildValueParameters-class.html#clear">clear</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BuildValueParameters.clear-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="BuildValueParameters.clear-expanded"><a name="L361"></a><tt class="py-lineno"> 361</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_build_value_items</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
</div><a name="L362"></a><tt class="py-lineno"> 362</tt>  <tt class="py-line"> </tt>
<a name="BuildValueParameters.add_parameter"></a><div id="BuildValueParameters.add_parameter-def"><a name="L363"></a><tt class="py-lineno"> 363</tt> <a class="py-toggle" href="#" id="BuildValueParameters.add_parameter-toggle" onclick="return toggle('BuildValueParameters.add_parameter');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.BuildValueParameters-class.html#add_parameter">add_parameter</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">param_template</tt><tt class="py-op">,</tt> <tt class="py-param">param_values</tt><tt class="py-op">,</tt> </tt>
<a name="L364"></a><tt class="py-lineno"> 364</tt>  <tt class="py-line">                      <tt class="py-param">prepend</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-param">cancels_cleanup</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BuildValueParameters.add_parameter-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="BuildValueParameters.add_parameter-expanded"><a name="L365"></a><tt class="py-lineno"> 365</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L366"></a><tt class="py-lineno"> 366</tt>  <tt class="py-line"><tt class="py-docstring">        Adds a new parameter to the Py_BuildValue (or similar) statement.</tt> </tt>
<a name="L367"></a><tt class="py-lineno"> 367</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L368"></a><tt class="py-lineno"> 368</tt>  <tt class="py-line"><tt class="py-docstring">        @param param_template: template item, see documentation for</tt> </tt>
<a name="L369"></a><tt class="py-lineno"> 369</tt>  <tt class="py-line"><tt class="py-docstring">                          Py_BuildValue for more information</tt> </tt>
<a name="L370"></a><tt class="py-lineno"> 370</tt>  <tt class="py-line"><tt class="py-docstring">        @param param_values: list of C expressions to use as value, see documentation</tt> </tt>
<a name="L371"></a><tt class="py-lineno"> 371</tt>  <tt class="py-line"><tt class="py-docstring">                        for Py_BuildValue for more information</tt> </tt>
<a name="L372"></a><tt class="py-lineno"> 372</tt>  <tt class="py-line"><tt class="py-docstring">        @param prepend: whether this parameter should come first in the tuple being built</tt> </tt>
<a name="L373"></a><tt class="py-lineno"> 373</tt>  <tt class="py-line"><tt class="py-docstring">        @param cancels_cleanup: optional handle to a cleanup action,</tt> </tt>
<a name="L374"></a><tt class="py-lineno"> 374</tt>  <tt class="py-line"><tt class="py-docstring">                           that is removed after the call.  Typically</tt> </tt>
<a name="L375"></a><tt class="py-lineno"> 375</tt>  <tt class="py-line"><tt class="py-docstring">                           this is used for 'N' parameters, which</tt> </tt>
<a name="L376"></a><tt class="py-lineno"> 376</tt>  <tt class="py-line"><tt class="py-docstring">                           already consume an object reference</tt> </tt>
<a name="L377"></a><tt class="py-lineno"> 377</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L378"></a><tt class="py-lineno"> 378</tt>  <tt class="py-line">        <tt class="py-name">item</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">param_template</tt><tt class="py-op">,</tt> <tt class="py-name">param_values</tt><tt class="py-op">,</tt> <tt class="py-name">cancels_cleanup</tt><tt class="py-op">)</tt> </tt>
<a name="L379"></a><tt class="py-lineno"> 379</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">prepend</tt><tt class="py-op">:</tt> </tt>
<a name="L380"></a><tt class="py-lineno"> 380</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_build_value_items</tt><tt class="py-op">.</tt><tt class="py-name">insert</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
<a name="L381"></a><tt class="py-lineno"> 381</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L382"></a><tt class="py-lineno"> 382</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_build_value_items</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
</div><a name="L383"></a><tt class="py-lineno"> 383</tt>  <tt class="py-line"> </tt>
<a name="BuildValueParameters.get_parameters"></a><div id="BuildValueParameters.get_parameters-def"><a name="L384"></a><tt class="py-lineno"> 384</tt> <a class="py-toggle" href="#" id="BuildValueParameters.get_parameters-toggle" onclick="return toggle('BuildValueParameters.get_parameters');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.BuildValueParameters-class.html#get_parameters">get_parameters</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">force_tuple_creation</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BuildValueParameters.get_parameters-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="BuildValueParameters.get_parameters-expanded"><a name="L385"></a><tt class="py-lineno"> 385</tt>  <tt class="py-line">        <tt class="py-docstring">"""returns a list of parameters to pass into a</tt> </tt>
<a name="L386"></a><tt class="py-lineno"> 386</tt>  <tt class="py-line"><tt class="py-docstring">        Py_BuildValue-style function call, the first paramter in</tt> </tt>
<a name="L387"></a><tt class="py-lineno"> 387</tt>  <tt class="py-line"><tt class="py-docstring">        the list being the template string.</tt> </tt>
<a name="L388"></a><tt class="py-lineno"> 388</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L389"></a><tt class="py-lineno"> 389</tt>  <tt class="py-line"><tt class="py-docstring">        @param force_tuple_creation: if True, Py_BuildValue is</tt> </tt>
<a name="L390"></a><tt class="py-lineno"> 390</tt>  <tt class="py-line"><tt class="py-docstring">        instructed to always create a tuple, even for zero or 1</tt> </tt>
<a name="L391"></a><tt class="py-lineno"> 391</tt>  <tt class="py-line"><tt class="py-docstring">        values.</tt> </tt>
<a name="L392"></a><tt class="py-lineno"> 392</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L393"></a><tt class="py-lineno"> 393</tt>  <tt class="py-line">        <tt class="py-name">template</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'"'</tt><tt class="py-op">]</tt> </tt>
<a name="L394"></a><tt class="py-lineno"> 394</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">force_tuple_creation</tt><tt class="py-op">:</tt> </tt>
<a name="L395"></a><tt class="py-lineno"> 395</tt>  <tt class="py-line">            <tt class="py-name">template</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">'('</tt><tt class="py-op">)</tt> </tt>
<a name="L396"></a><tt class="py-lineno"> 396</tt>  <tt class="py-line">        <tt class="py-name">params</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">None</tt><tt class="py-op">]</tt> </tt>
<a name="L397"></a><tt class="py-lineno"> 397</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">param_template</tt><tt class="py-op">,</tt> <tt class="py-name">param_values</tt><tt class="py-op">,</tt> <tt class="py-name">dummy</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_build_value_items</tt><tt class="py-op">:</tt> </tt>
<a name="L398"></a><tt class="py-lineno"> 398</tt>  <tt class="py-line">            <tt class="py-name">template</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">param_template</tt><tt class="py-op">)</tt> </tt>
<a name="L399"></a><tt class="py-lineno"> 399</tt>  <tt class="py-line">            <tt class="py-name">params</tt><tt class="py-op">.</tt><tt class="py-name">extend</tt><tt class="py-op">(</tt><tt class="py-name">param_values</tt><tt class="py-op">)</tt> </tt>
<a name="L400"></a><tt class="py-lineno"> 400</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">force_tuple_creation</tt><tt class="py-op">:</tt> </tt>
<a name="L401"></a><tt class="py-lineno"> 401</tt>  <tt class="py-line">            <tt class="py-name">template</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">')'</tt><tt class="py-op">)</tt> </tt>
<a name="L402"></a><tt class="py-lineno"> 402</tt>  <tt class="py-line">        <tt class="py-name">template</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">'"'</tt><tt class="py-op">)</tt> </tt>
<a name="L403"></a><tt class="py-lineno"> 403</tt>  <tt class="py-line">        <tt class="py-name">params</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">template</tt><tt class="py-op">)</tt> </tt>
<a name="L404"></a><tt class="py-lineno"> 404</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">params</tt> </tt>
</div><a name="L405"></a><tt class="py-lineno"> 405</tt>  <tt class="py-line"> </tt>
<a name="BuildValueParameters.get_cleanups"></a><div id="BuildValueParameters.get_cleanups-def"><a name="L406"></a><tt class="py-lineno"> 406</tt> <a class="py-toggle" href="#" id="BuildValueParameters.get_cleanups-toggle" onclick="return toggle('BuildValueParameters.get_cleanups');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.BuildValueParameters-class.html#get_cleanups">get_cleanups</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="BuildValueParameters.get_cleanups-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="BuildValueParameters.get_cleanups-expanded"><a name="L407"></a><tt class="py-lineno"> 407</tt>  <tt class="py-line">        <tt class="py-docstring">"""Get a list of handles to cleanup actions"""</tt> </tt>
<a name="L408"></a><tt class="py-lineno"> 408</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-name">cleanup</tt> <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">dummy</tt><tt class="py-op">,</tt> <tt class="py-name">dummy</tt><tt class="py-op">,</tt> <tt class="py-name">cleanup</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_build_value_items</tt><tt class="py-op">]</tt> </tt>
</div></div><a name="L409"></a><tt class="py-lineno"> 409</tt>  <tt class="py-line"> </tt>
<a name="L410"></a><tt class="py-lineno"> 410</tt>  <tt class="py-line"> </tt>
<a name="DeclarationsScope"></a><div id="DeclarationsScope-def"><a name="L411"></a><tt class="py-lineno"> 411</tt> <a class="py-toggle" href="#" id="DeclarationsScope-toggle" onclick="return toggle('DeclarationsScope');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.DeclarationsScope-class.html">DeclarationsScope</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DeclarationsScope-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="DeclarationsScope-expanded"><a name="L412"></a><tt class="py-lineno"> 412</tt>  <tt class="py-line">    <tt class="py-docstring">"""Manages variable declarations in a given scope."""</tt> </tt>
<a name="L413"></a><tt class="py-lineno"> 413</tt>  <tt class="py-line"> </tt>
<a name="DeclarationsScope.__init__"></a><div id="DeclarationsScope.__init__-def"><a name="L414"></a><tt class="py-lineno"> 414</tt> <a class="py-toggle" href="#" id="DeclarationsScope.__init__-toggle" onclick="return toggle('DeclarationsScope.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.DeclarationsScope-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">parent_scope</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DeclarationsScope.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DeclarationsScope.__init__-expanded"><a name="L415"></a><tt class="py-lineno"> 415</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L416"></a><tt class="py-lineno"> 416</tt>  <tt class="py-line"><tt class="py-docstring">        Constructor</tt> </tt>
<a name="L417"></a><tt class="py-lineno"> 417</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L418"></a><tt class="py-lineno"> 418</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; scope = DeclarationsScope()</tt> </tt>
<a name="L419"></a><tt class="py-lineno"> 419</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; scope.declare_variable('int', 'foo')</tt> </tt>
<a name="L420"></a><tt class="py-lineno"> 420</tt>  <tt class="py-line"><tt class="py-docstring">        'foo'</tt> </tt>
<a name="L421"></a><tt class="py-lineno"> 421</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; scope.declare_variable('char*', 'bar')</tt> </tt>
<a name="L422"></a><tt class="py-lineno"> 422</tt>  <tt class="py-line"><tt class="py-docstring">        'bar'</tt> </tt>
<a name="L423"></a><tt class="py-lineno"> 423</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; scope.declare_variable('int', 'foo')</tt> </tt>
<a name="L424"></a><tt class="py-lineno"> 424</tt>  <tt class="py-line"><tt class="py-docstring">        'foo2'</tt> </tt>
<a name="L425"></a><tt class="py-lineno"> 425</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; scope.declare_variable('int', 'foo', '1')</tt> </tt>
<a name="L426"></a><tt class="py-lineno"> 426</tt>  <tt class="py-line"><tt class="py-docstring">        'foo3'</tt> </tt>
<a name="L427"></a><tt class="py-lineno"> 427</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; scope.declare_variable('const char *', 'kwargs', '{"hello", NULL}', '[]')</tt> </tt>
<a name="L428"></a><tt class="py-lineno"> 428</tt>  <tt class="py-line"><tt class="py-docstring">        'kwargs'</tt> </tt>
<a name="L429"></a><tt class="py-lineno"> 429</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; print scope.get_code_sink().flush().rstrip()</tt> </tt>
<a name="L430"></a><tt class="py-lineno"> 430</tt>  <tt class="py-line"><tt class="py-docstring">        int foo;</tt> </tt>
<a name="L431"></a><tt class="py-lineno"> 431</tt>  <tt class="py-line"><tt class="py-docstring">        char *bar;</tt> </tt>
<a name="L432"></a><tt class="py-lineno"> 432</tt>  <tt class="py-line"><tt class="py-docstring">        int foo2;</tt> </tt>
<a name="L433"></a><tt class="py-lineno"> 433</tt>  <tt class="py-line"><tt class="py-docstring">        int foo3 = 1;</tt> </tt>
<a name="L434"></a><tt class="py-lineno"> 434</tt>  <tt class="py-line"><tt class="py-docstring">        const char *kwargs[] = {"hello", NULL};</tt> </tt>
<a name="L435"></a><tt class="py-lineno"> 435</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L436"></a><tt class="py-lineno"> 436</tt>  <tt class="py-line"><tt class="py-docstring">        @param parent_scope: optional 'parent scope'; if given,</tt> </tt>
<a name="L437"></a><tt class="py-lineno"> 437</tt>  <tt class="py-line"><tt class="py-docstring">                        declarations in this scope will avoid clashing</tt> </tt>
<a name="L438"></a><tt class="py-lineno"> 438</tt>  <tt class="py-line"><tt class="py-docstring">                        with names in the parent scope, and vice</tt> </tt>
<a name="L439"></a><tt class="py-lineno"> 439</tt>  <tt class="py-line"><tt class="py-docstring">                        versa.</tt> </tt>
<a name="L440"></a><tt class="py-lineno"> 440</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L441"></a><tt class="py-lineno"> 441</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_declarations</tt> <tt class="py-op">=</tt> <tt id="link-55" class="py-name"><a title="pybindgen.typehandlers.codesink" class="py-name" href="#" onclick="return doclink('link-55', 'codesink', 'link-0');">codesink</a></tt><tt class="py-op">.</tt><tt id="link-56" class="py-name"><a title="pybindgen.typehandlers.codesink.MemoryCodeSink" class="py-name" href="#" onclick="return doclink('link-56', 'MemoryCodeSink', 'link-22');">MemoryCodeSink</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L442"></a><tt class="py-lineno"> 442</tt>  <tt class="py-line">        <tt class="py-comment">## name -&gt; number of variables with that name prefix</tt> </tt>
<a name="L443"></a><tt class="py-lineno"> 443</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">parent_scope</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L444"></a><tt class="py-lineno"> 444</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declared_variables</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L445"></a><tt class="py-lineno"> 445</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L446"></a><tt class="py-lineno"> 446</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">parent_scope</tt><tt class="py-op">,</tt> <tt id="link-57" class="py-name"><a title="pybindgen.typehandlers.base.DeclarationsScope" class="py-name" href="#" onclick="return doclink('link-57', 'DeclarationsScope', 'link-19');">DeclarationsScope</a></tt><tt class="py-op">)</tt> </tt>
<a name="L447"></a><tt class="py-lineno"> 447</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declared_variables</tt> <tt class="py-op">=</tt> <tt class="py-name">parent_scope</tt><tt class="py-op">.</tt><tt class="py-name">declared_variables</tt> </tt>
</div><a name="L448"></a><tt class="py-lineno"> 448</tt>  <tt class="py-line"> </tt>
<a name="DeclarationsScope.clear"></a><div id="DeclarationsScope.clear-def"><a name="L449"></a><tt class="py-lineno"> 449</tt> <a class="py-toggle" href="#" id="DeclarationsScope.clear-toggle" onclick="return toggle('DeclarationsScope.clear');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.DeclarationsScope-class.html#clear">clear</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DeclarationsScope.clear-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DeclarationsScope.clear-expanded"><a name="L450"></a><tt class="py-lineno"> 450</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_declarations</tt> <tt class="py-op">=</tt> <tt id="link-58" class="py-name"><a title="pybindgen.typehandlers.codesink" class="py-name" href="#" onclick="return doclink('link-58', 'codesink', 'link-0');">codesink</a></tt><tt class="py-op">.</tt><tt id="link-59" class="py-name"><a title="pybindgen.typehandlers.codesink.MemoryCodeSink" class="py-name" href="#" onclick="return doclink('link-59', 'MemoryCodeSink', 'link-22');">MemoryCodeSink</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L451"></a><tt class="py-lineno"> 451</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declared_variables</tt><tt class="py-op">.</tt><tt id="link-60" class="py-name" targets="Method pybindgen.typehandlers.base.BuildValueParameters.clear()=pybindgen.typehandlers.base.BuildValueParameters-class.html#clear,Method pybindgen.typehandlers.base.CodeBlock.clear()=pybindgen.typehandlers.base.CodeBlock-class.html#clear,Method pybindgen.typehandlers.base.DeclarationsScope.clear()=pybindgen.typehandlers.base.DeclarationsScope-class.html#clear,Method pybindgen.typehandlers.base.ParseTupleParameters.clear()=pybindgen.typehandlers.base.ParseTupleParameters-class.html#clear"><a title="pybindgen.typehandlers.base.BuildValueParameters.clear
pybindgen.typehandlers.base.CodeBlock.clear
pybindgen.typehandlers.base.DeclarationsScope.clear
pybindgen.typehandlers.base.ParseTupleParameters.clear" class="py-name" href="#" onclick="return doclink('link-60', 'clear', 'link-60');">clear</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L452"></a><tt class="py-lineno"> 452</tt>  <tt class="py-line"> </tt>
<a name="DeclarationsScope.declare_variable"></a><div id="DeclarationsScope.declare_variable-def"><a name="L453"></a><tt class="py-lineno"> 453</tt> <a class="py-toggle" href="#" id="DeclarationsScope.declare_variable-toggle" onclick="return toggle('DeclarationsScope.declare_variable');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.DeclarationsScope-class.html#declare_variable">declare_variable</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">type_</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">initializer</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">array</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DeclarationsScope.declare_variable-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DeclarationsScope.declare_variable-expanded"><a name="L454"></a><tt class="py-lineno"> 454</tt>  <tt class="py-line">        <tt class="py-docstring">"""Add code to declare a variable. Returns the actual variable</tt> </tt>
<a name="L455"></a><tt class="py-lineno"> 455</tt>  <tt class="py-line"><tt class="py-docstring">        name used (uses 'name' as base, with a number in case of conflict.)</tt> </tt>
<a name="L456"></a><tt class="py-lineno"> 456</tt>  <tt class="py-line"><tt class="py-docstring">        @param type_: C type name of the variable</tt> </tt>
<a name="L457"></a><tt class="py-lineno"> 457</tt>  <tt class="py-line"><tt class="py-docstring">        @param name: base name of the variable; actual name used can be</tt> </tt>
<a name="L458"></a><tt class="py-lineno"> 458</tt>  <tt class="py-line"><tt class="py-docstring">                slightly different in case of name conflict.</tt> </tt>
<a name="L459"></a><tt class="py-lineno"> 459</tt>  <tt class="py-line"><tt class="py-docstring">        @param initializer: optional, value to initialize the variable with</tt> </tt>
<a name="L460"></a><tt class="py-lineno"> 460</tt>  <tt class="py-line"><tt class="py-docstring">        @param array: optional, array size specifiction, e.g. '[]', or '[100]'</tt> </tt>
<a name="L461"></a><tt class="py-lineno"> 461</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L462"></a><tt class="py-lineno"> 462</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L463"></a><tt class="py-lineno"> 463</tt>  <tt class="py-line">            <tt class="py-name">num</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declared_variables</tt><tt class="py-op">[</tt><tt id="link-61" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-61', 'name', 'link-4');">name</a></tt><tt class="py-op">]</tt> </tt>
<a name="L464"></a><tt class="py-lineno"> 464</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
<a name="L465"></a><tt class="py-lineno"> 465</tt>  <tt class="py-line">            <tt class="py-name">num</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L466"></a><tt class="py-lineno"> 466</tt>  <tt class="py-line">        <tt class="py-name">num</tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
<a name="L467"></a><tt class="py-lineno"> 467</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declared_variables</tt><tt class="py-op">[</tt><tt id="link-62" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-62', 'name', 'link-4');">name</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">num</tt> </tt>
<a name="L468"></a><tt class="py-lineno"> 468</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">num</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L469"></a><tt class="py-lineno"> 469</tt>  <tt class="py-line">            <tt class="py-name">varname</tt> <tt class="py-op">=</tt> <tt id="link-63" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-63', 'name', 'link-4');">name</a></tt> </tt>
<a name="L470"></a><tt class="py-lineno"> 470</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L471"></a><tt class="py-lineno"> 471</tt>  <tt class="py-line">            <tt class="py-name">varname</tt> <tt class="py-op">=</tt> <tt class="py-string">"%s%i"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-64" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-64', 'name', 'link-4');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">num</tt><tt class="py-op">)</tt> </tt>
<a name="L472"></a><tt class="py-lineno"> 472</tt>  <tt class="py-line">        <tt class="py-name">decl</tt> <tt class="py-op">=</tt> <tt id="link-65" class="py-name" targets="Function pybindgen.typehandlers.base.join_ctype_and_name()=pybindgen.typehandlers.base-module.html#join_ctype_and_name"><a title="pybindgen.typehandlers.base.join_ctype_and_name" class="py-name" href="#" onclick="return doclink('link-65', 'join_ctype_and_name', 'link-65');">join_ctype_and_name</a></tt><tt class="py-op">(</tt><tt class="py-name">type_</tt><tt class="py-op">,</tt> <tt class="py-name">varname</tt><tt class="py-op">)</tt> </tt>
<a name="L473"></a><tt class="py-lineno"> 473</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">array</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L474"></a><tt class="py-lineno"> 474</tt>  <tt class="py-line">            <tt class="py-name">decl</tt> <tt class="py-op">+=</tt> <tt class="py-name">array</tt> </tt>
<a name="L475"></a><tt class="py-lineno"> 475</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">initializer</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L476"></a><tt class="py-lineno"> 476</tt>  <tt class="py-line">            <tt class="py-name">decl</tt> <tt class="py-op">+=</tt> <tt class="py-string">' = '</tt> <tt class="py-op">+</tt> <tt class="py-name">initializer</tt> </tt>
<a name="L477"></a><tt class="py-lineno"> 477</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_declarations</tt><tt class="py-op">.</tt><tt id="link-66" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-66', 'writeln', 'link-29');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-name">decl</tt> <tt class="py-op">+</tt> <tt class="py-string">';'</tt><tt class="py-op">)</tt> </tt>
<a name="L478"></a><tt class="py-lineno"> 478</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">varname</tt> </tt>
</div><a name="L479"></a><tt class="py-lineno"> 479</tt>  <tt class="py-line"> </tt>
<a name="DeclarationsScope.reserve_variable"></a><div id="DeclarationsScope.reserve_variable-def"><a name="L480"></a><tt class="py-lineno"> 480</tt> <a class="py-toggle" href="#" id="DeclarationsScope.reserve_variable-toggle" onclick="return toggle('DeclarationsScope.reserve_variable');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.DeclarationsScope-class.html#reserve_variable">reserve_variable</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DeclarationsScope.reserve_variable-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DeclarationsScope.reserve_variable-expanded"><a name="L481"></a><tt class="py-lineno"> 481</tt>  <tt class="py-line">        <tt class="py-docstring">"""Reserve a variable name, to be used later.</tt> </tt>
<a name="L482"></a><tt class="py-lineno"> 482</tt>  <tt class="py-line"><tt class="py-docstring">        @param name: base name of the variable; actual name used can be</tt> </tt>
<a name="L483"></a><tt class="py-lineno"> 483</tt>  <tt class="py-line"><tt class="py-docstring">                slightly different in case of name conflict.</tt> </tt>
<a name="L484"></a><tt class="py-lineno"> 484</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L485"></a><tt class="py-lineno"> 485</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L486"></a><tt class="py-lineno"> 486</tt>  <tt class="py-line">            <tt class="py-name">num</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declared_variables</tt><tt class="py-op">[</tt><tt id="link-67" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-67', 'name', 'link-4');">name</a></tt><tt class="py-op">]</tt> </tt>
<a name="L487"></a><tt class="py-lineno"> 487</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
<a name="L488"></a><tt class="py-lineno"> 488</tt>  <tt class="py-line">            <tt class="py-name">num</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L489"></a><tt class="py-lineno"> 489</tt>  <tt class="py-line">        <tt class="py-name">num</tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
<a name="L490"></a><tt class="py-lineno"> 490</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declared_variables</tt><tt class="py-op">[</tt><tt id="link-68" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-68', 'name', 'link-4');">name</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">num</tt> </tt>
<a name="L491"></a><tt class="py-lineno"> 491</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">num</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L492"></a><tt class="py-lineno"> 492</tt>  <tt class="py-line">            <tt class="py-name">varname</tt> <tt class="py-op">=</tt> <tt id="link-69" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-69', 'name', 'link-4');">name</a></tt> </tt>
<a name="L493"></a><tt class="py-lineno"> 493</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L494"></a><tt class="py-lineno"> 494</tt>  <tt class="py-line">            <tt class="py-name">varname</tt> <tt class="py-op">=</tt> <tt class="py-string">"%s%i"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-70" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-70', 'name', 'link-4');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">num</tt><tt class="py-op">)</tt> </tt>
<a name="L495"></a><tt class="py-lineno"> 495</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">varname</tt> </tt>
</div><a name="L496"></a><tt class="py-lineno"> 496</tt>  <tt class="py-line"> </tt>
<a name="DeclarationsScope.get_code_sink"></a><div id="DeclarationsScope.get_code_sink-def"><a name="L497"></a><tt class="py-lineno"> 497</tt> <a class="py-toggle" href="#" id="DeclarationsScope.get_code_sink-toggle" onclick="return toggle('DeclarationsScope.get_code_sink');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.DeclarationsScope-class.html#get_code_sink">get_code_sink</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DeclarationsScope.get_code_sink-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="DeclarationsScope.get_code_sink-expanded"><a name="L498"></a><tt class="py-lineno"> 498</tt>  <tt class="py-line">        <tt class="py-docstring">"""Returns the internal MemoryCodeSink that holds all declararions."""</tt> </tt>
<a name="L499"></a><tt class="py-lineno"> 499</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_declarations</tt> </tt>
</div></div><a name="L500"></a><tt class="py-lineno"> 500</tt>  <tt class="py-line"> </tt>
<a name="L501"></a><tt class="py-lineno"> 501</tt>  <tt class="py-line"> </tt>
<a name="L502"></a><tt class="py-lineno"> 502</tt>  <tt class="py-line"> </tt>
<a name="ReverseWrapperBase"></a><div id="ReverseWrapperBase-def"><a name="L503"></a><tt class="py-lineno"> 503</tt> <a class="py-toggle" href="#" id="ReverseWrapperBase-toggle" onclick="return toggle('ReverseWrapperBase');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ReverseWrapperBase-class.html">ReverseWrapperBase</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReverseWrapperBase-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="ReverseWrapperBase-expanded"><a name="L504"></a><tt class="py-lineno"> 504</tt>  <tt class="py-line">    <tt class="py-docstring">"""Generic base for all reverse wrapper generators.</tt> </tt>
<a name="L505"></a><tt class="py-lineno"> 505</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L506"></a><tt class="py-lineno"> 506</tt>  <tt class="py-line"><tt class="py-docstring">    Reverse wrappers all have the following general structure in common:</tt> </tt>
<a name="L507"></a><tt class="py-lineno"> 507</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L508"></a><tt class="py-lineno"> 508</tt>  <tt class="py-line"><tt class="py-docstring">     1. 'declarations' -- variable declarations; for compatibility with</tt> </tt>
<a name="L509"></a><tt class="py-lineno"> 509</tt>  <tt class="py-line"><tt class="py-docstring">       older C compilers it is very important that all declarations</tt> </tt>
<a name="L510"></a><tt class="py-lineno"> 510</tt>  <tt class="py-line"><tt class="py-docstring">       come before any simple statement.  Declarations can be added</tt> </tt>
<a name="L511"></a><tt class="py-lineno"> 511</tt>  <tt class="py-line"><tt class="py-docstring">       with the add_declaration() method on the 'declarations'</tt> </tt>
<a name="L512"></a><tt class="py-lineno"> 512</tt>  <tt class="py-line"><tt class="py-docstring">       attribute.  Two standard declarations are always predeclared:</tt> </tt>
<a name="L513"></a><tt class="py-lineno"> 513</tt>  <tt class="py-line"><tt class="py-docstring">       '&lt;return-type&gt; retval', unless return-type is void, and 'PyObject</tt> </tt>
<a name="L514"></a><tt class="py-lineno"> 514</tt>  <tt class="py-line"><tt class="py-docstring">       *py_retval';</tt> </tt>
<a name="L515"></a><tt class="py-lineno"> 515</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L516"></a><tt class="py-lineno"> 516</tt>  <tt class="py-line"><tt class="py-docstring">     2. 'code before call' -- this is a code block dedicated to contain</tt> </tt>
<a name="L517"></a><tt class="py-lineno"> 517</tt>  <tt class="py-line"><tt class="py-docstring">       all code that is needed before calling into Python; code can be</tt> </tt>
<a name="L518"></a><tt class="py-lineno"> 518</tt>  <tt class="py-line"><tt class="py-docstring">       freely added to it by accessing the 'before_call' (a CodeBlock</tt> </tt>
<a name="L519"></a><tt class="py-lineno"> 519</tt>  <tt class="py-line"><tt class="py-docstring">       instance) attribute;</tt> </tt>
<a name="L520"></a><tt class="py-lineno"> 520</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L521"></a><tt class="py-lineno"> 521</tt>  <tt class="py-line"><tt class="py-docstring">     3. 'call into python' -- this is realized by a</tt> </tt>
<a name="L522"></a><tt class="py-lineno"> 522</tt>  <tt class="py-line"><tt class="py-docstring">       PyObject_CallMethod(...) or similar Python API call; the list</tt> </tt>
<a name="L523"></a><tt class="py-lineno"> 523</tt>  <tt class="py-line"><tt class="py-docstring">       of parameters used in this call can be customized by accessing</tt> </tt>
<a name="L524"></a><tt class="py-lineno"> 524</tt>  <tt class="py-line"><tt class="py-docstring">       the 'build_params' (a BuildValueParameters instance) attribute;</tt> </tt>
<a name="L525"></a><tt class="py-lineno"> 525</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L526"></a><tt class="py-lineno"> 526</tt>  <tt class="py-line"><tt class="py-docstring">     4. 'code after call' -- this is a code block dedicated to contain</tt> </tt>
<a name="L527"></a><tt class="py-lineno"> 527</tt>  <tt class="py-line"><tt class="py-docstring">       all code that must come after calling into Python; code can be</tt> </tt>
<a name="L528"></a><tt class="py-lineno"> 528</tt>  <tt class="py-line"><tt class="py-docstring">       freely added to it by accessing the 'after_call' (a CodeBlock</tt> </tt>
<a name="L529"></a><tt class="py-lineno"> 529</tt>  <tt class="py-line"><tt class="py-docstring">       instance) attribute;</tt> </tt>
<a name="L530"></a><tt class="py-lineno"> 530</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L531"></a><tt class="py-lineno"> 531</tt>  <tt class="py-line"><tt class="py-docstring">     5. A 'return retval' statement (or just 'return' if return_value is void)</tt> </tt>
<a name="L532"></a><tt class="py-lineno"> 532</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L533"></a><tt class="py-lineno"> 533</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L534"></a><tt class="py-lineno"> 534</tt>  <tt class="py-line"> </tt>
<a name="L535"></a><tt class="py-lineno"> 535</tt>  <tt class="py-line">    <tt id="link-71" class="py-name" targets="Variable pybindgen.converter_functions.PythonToCConverter.NO_GIL_LOCKING=pybindgen.converter_functions.PythonToCConverter-class.html#NO_GIL_LOCKING,Variable pybindgen.cppattribute.PySetter.NO_GIL_LOCKING=pybindgen.cppattribute.PySetter-class.html#NO_GIL_LOCKING,Variable pybindgen.typehandlers.base.ReverseWrapperBase.NO_GIL_LOCKING=pybindgen.typehandlers.base.ReverseWrapperBase-class.html#NO_GIL_LOCKING"><a title="pybindgen.converter_functions.PythonToCConverter.NO_GIL_LOCKING
pybindgen.cppattribute.PySetter.NO_GIL_LOCKING
pybindgen.typehandlers.base.ReverseWrapperBase.NO_GIL_LOCKING" class="py-name" href="#" onclick="return doclink('link-71', 'NO_GIL_LOCKING', 'link-71');">NO_GIL_LOCKING</a></tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L536"></a><tt class="py-lineno"> 536</tt>  <tt class="py-line"> </tt>
<a name="ReverseWrapperBase.__init__"></a><div id="ReverseWrapperBase.__init__-def"><a name="L537"></a><tt class="py-lineno"> 537</tt> <a class="py-toggle" href="#" id="ReverseWrapperBase.__init__-toggle" onclick="return toggle('ReverseWrapperBase.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ReverseWrapperBase-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">return_value</tt><tt class="py-op">,</tt> <tt class="py-param">parameters</tt><tt class="py-op">,</tt> <tt class="py-param">error_return</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReverseWrapperBase.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReverseWrapperBase.__init__-expanded"><a name="L538"></a><tt class="py-lineno"> 538</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L539"></a><tt class="py-lineno"> 539</tt>  <tt class="py-line"><tt class="py-docstring">        Base constructor</tt> </tt>
<a name="L540"></a><tt class="py-lineno"> 540</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L541"></a><tt class="py-lineno"> 541</tt>  <tt class="py-line"><tt class="py-docstring">        @param return_value: type handler for the return value</tt> </tt>
<a name="L542"></a><tt class="py-lineno"> 542</tt>  <tt class="py-line"><tt class="py-docstring">        @param parameters: a list of type handlers for the parameters</tt> </tt>
<a name="L543"></a><tt class="py-lineno"> 543</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L544"></a><tt class="py-lineno"> 544</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L545"></a><tt class="py-lineno"> 545</tt>  <tt class="py-line"> </tt>
<a name="L546"></a><tt class="py-lineno"> 546</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">return_value</tt><tt class="py-op">,</tt> <tt id="link-72" class="py-name" targets="Class pybindgen.typehandlers.base.TypeHandler=pybindgen.typehandlers.base.TypeHandler-class.html"><a title="pybindgen.typehandlers.base.TypeHandler" class="py-name" href="#" onclick="return doclink('link-72', 'TypeHandler', 'link-72');">TypeHandler</a></tt><tt class="py-op">)</tt> </tt>
<a name="L547"></a><tt class="py-lineno"> 547</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">parameters</tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">)</tt> </tt>
<a name="L548"></a><tt class="py-lineno"> 548</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt id="link-73" class="py-name"><a title="pybindgen.typehandlers.base.all" class="py-name" href="#" onclick="return doclink('link-73', 'all', 'link-3');">all</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-74" class="py-name" targets="Function pybindgen.utils.param()=pybindgen.utils-module.html#param"><a title="pybindgen.utils.param" class="py-name" href="#" onclick="return doclink('link-74', 'param', 'link-74');">param</a></tt><tt class="py-op">,</tt> <tt id="link-75" class="py-name" targets="Class pybindgen.typehandlers.base.Parameter=pybindgen.typehandlers.base.Parameter-class.html"><a title="pybindgen.typehandlers.base.Parameter" class="py-name" href="#" onclick="return doclink('link-75', 'Parameter', 'link-75');">Parameter</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-76" class="py-name"><a title="pybindgen.utils.param" class="py-name" href="#" onclick="return doclink('link-76', 'param', 'link-74');">param</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">parameters</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L549"></a><tt class="py-lineno"> 549</tt>  <tt class="py-line"> </tt>
<a name="L550"></a><tt class="py-lineno"> 550</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">return_value</tt> <tt class="py-op">=</tt> <tt class="py-name">return_value</tt> </tt>
<a name="L551"></a><tt class="py-lineno"> 551</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parameters</tt> <tt class="py-op">=</tt> <tt class="py-name">parameters</tt> </tt>
<a name="L552"></a><tt class="py-lineno"> 552</tt>  <tt class="py-line"> </tt>
<a name="L553"></a><tt class="py-lineno"> 553</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">error_return</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L554"></a><tt class="py-lineno"> 554</tt>  <tt class="py-line">            <tt class="py-name">error_return</tt> <tt class="py-op">=</tt> <tt class="py-name">return_value</tt><tt class="py-op">.</tt><tt id="link-77" class="py-name" targets="Method pybindgen.container.ContainerReturnValue.get_c_error_return()=pybindgen.container.ContainerReturnValue-class.html#get_c_error_return,Method pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.get_c_error_return()=pybindgen.cppclass_typehandlers.CppClassPtrReturnValue-class.html#get_c_error_return,Method pybindgen.cppclass_typehandlers.CppClassReturnValue.get_c_error_return()=pybindgen.cppclass_typehandlers.CppClassReturnValue-class.html#get_c_error_return,Method pybindgen.cppmethod.DummyReturnValue.get_c_error_return()=pybindgen.cppmethod.DummyReturnValue-class.html#get_c_error_return,Method pybindgen.typehandlers.base.ReturnValue.get_c_error_return()=pybindgen.typehandlers.base.ReturnValue-class.html#get_c_error_return,Method pybindgen.typehandlers.booltype.BoolReturn.get_c_error_return()=pybindgen.typehandlers.booltype.BoolReturn-class.html#get_c_error_return,Method pybindgen.typehandlers.doubletype.DoubleReturn.get_c_error_return()=pybindgen.typehandlers.doubletype.DoubleReturn-class.html#get_c_error_return,Method pybindgen.typehandlers.floattype.FloatReturn.get_c_error_return()=pybindgen.typehandlers.floattype.FloatReturn-class.html#get_c_error_return,Method pybindgen.typehandlers.inttype.Int16Return.get_c_error_return()=pybindgen.typehandlers.inttype.Int16Return-class.html#get_c_error_return,Method pybindgen.typehandlers.inttype.IntReturn.get_c_error_return()=pybindgen.typehandlers.inttype.IntReturn-class.html#get_c_error_return,Method pybindgen.typehandlers.inttype.LongLongReturn.get_c_error_return()=pybindgen.typehandlers.inttype.LongLongReturn-class.html#get_c_error_return,Method pybindgen.typehandlers.inttype.SizeTReturn.get_c_error_return()=pybindgen.typehandlers.inttype.SizeTReturn-class.html#get_c_error_return,Method pybindgen.typehandlers.inttype.UInt16Return.get_c_error_return()=pybindgen.typehandlers.inttype.UInt16Return-class.html#get_c_error_return,Method pybindgen.typehandlers.inttype.UInt8Return.get_c_error_return()=pybindgen.typehandlers.inttype.UInt8Return-class.html#get_c_error_return,Method pybindgen.typehandlers.inttype.UnsignedIntReturn.get_c_error_return()=pybindgen.typehandlers.inttype.UnsignedIntReturn-class.html#get_c_error_return,Method pybindgen.typehandlers.inttype.UnsignedLongLongReturn.get_c_error_return()=pybindgen.typehandlers.inttype.UnsignedLongLongReturn-class.html#get_c_error_return,Method pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.get_c_error_return()=pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue-class.html#get_c_error_return,Method pybindgen.typehandlers.stringtype.CStringReturn.get_c_error_return()=pybindgen.typehandlers.stringtype.CStringReturn-class.html#get_c_error_return,Method pybindgen.typehandlers.stringtype.CharReturn.get_c_error_return()=pybindgen.typehandlers.stringtype.CharReturn-class.html#get_c_error_return,Method pybindgen.typehandlers.stringtype.StdStringReturn.get_c_error_return()=pybindgen.typehandlers.stringtype.StdStringReturn-class.html#get_c_error_return,Method pybindgen.typehandlers.voidtype.VoidReturn.get_c_error_return()=pybindgen.typehandlers.voidtype.VoidReturn-class.html#get_c_error_return"><a title="pybindgen.container.ContainerReturnValue.get_c_error_return
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.get_c_error_return
pybindgen.cppclass_typehandlers.CppClassReturnValue.get_c_error_return
pybindgen.cppmethod.DummyReturnValue.get_c_error_return
pybindgen.typehandlers.base.ReturnValue.get_c_error_return
pybindgen.typehandlers.booltype.BoolReturn.get_c_error_return
pybindgen.typehandlers.doubletype.DoubleReturn.get_c_error_return
pybindgen.typehandlers.floattype.FloatReturn.get_c_error_return
pybindgen.typehandlers.inttype.Int16Return.get_c_error_return
pybindgen.typehandlers.inttype.IntReturn.get_c_error_return
pybindgen.typehandlers.inttype.LongLongReturn.get_c_error_return
pybindgen.typehandlers.inttype.SizeTReturn.get_c_error_return
pybindgen.typehandlers.inttype.UInt16Return.get_c_error_return
pybindgen.typehandlers.inttype.UInt8Return.get_c_error_return
pybindgen.typehandlers.inttype.UnsignedIntReturn.get_c_error_return
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.get_c_error_return
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.get_c_error_return
pybindgen.typehandlers.stringtype.CStringReturn.get_c_error_return
pybindgen.typehandlers.stringtype.CharReturn.get_c_error_return
pybindgen.typehandlers.stringtype.StdStringReturn.get_c_error_return
pybindgen.typehandlers.voidtype.VoidReturn.get_c_error_return" class="py-name" href="#" onclick="return doclink('link-77', 'get_c_error_return', 'link-77');">get_c_error_return</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L555"></a><tt class="py-lineno"> 555</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_return</tt> <tt class="py-op">=</tt> <tt class="py-name">error_return</tt> </tt>
<a name="L556"></a><tt class="py-lineno"> 556</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt> <tt class="py-op">=</tt> <tt id="link-78" class="py-name"><a title="pybindgen.typehandlers.base.DeclarationsScope" class="py-name" href="#" onclick="return doclink('link-78', 'DeclarationsScope', 'link-19');">DeclarationsScope</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L557"></a><tt class="py-lineno"> 557</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_call</tt> <tt class="py-op">=</tt> <tt id="link-79" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock" class="py-name" href="#" onclick="return doclink('link-79', 'CodeBlock', 'link-20');">CodeBlock</a></tt><tt class="py-op">(</tt><tt class="py-name">error_return</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt><tt class="py-op">)</tt> </tt>
<a name="L558"></a><tt class="py-lineno"> 558</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">after_call</tt> <tt class="py-op">=</tt> <tt id="link-80" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock" class="py-name" href="#" onclick="return doclink('link-80', 'CodeBlock', 'link-20');">CodeBlock</a></tt><tt class="py-op">(</tt><tt class="py-name">error_return</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt><tt class="py-op">,</tt> </tt>
<a name="L559"></a><tt class="py-lineno"> 559</tt>  <tt class="py-line">                                    <tt class="py-name">predecessor</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_call</tt><tt class="py-op">)</tt> </tt>
<a name="L560"></a><tt class="py-lineno"> 560</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">build_params</tt> <tt class="py-op">=</tt> <tt id="link-81" class="py-name" targets="Class pybindgen.typehandlers.base.BuildValueParameters=pybindgen.typehandlers.base.BuildValueParameters-class.html"><a title="pybindgen.typehandlers.base.BuildValueParameters" class="py-name" href="#" onclick="return doclink('link-81', 'BuildValueParameters', 'link-81');">BuildValueParameters</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L561"></a><tt class="py-lineno"> 561</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parse_params</tt> <tt class="py-op">=</tt> <tt id="link-82" class="py-name" targets="Class pybindgen.typehandlers.base.ParseTupleParameters=pybindgen.typehandlers.base.ParseTupleParameters-class.html"><a title="pybindgen.typehandlers.base.ParseTupleParameters" class="py-name" href="#" onclick="return doclink('link-82', 'ParseTupleParameters', 'link-82');">ParseTupleParameters</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L562"></a><tt class="py-lineno"> 562</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generate_gil_code</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L563"></a><tt class="py-lineno"> 563</tt>  <tt class="py-line"> </tt>
<a name="ReverseWrapperBase.set_error_return"></a><div id="ReverseWrapperBase.set_error_return-def"><a name="L564"></a><tt class="py-lineno"> 564</tt> <a class="py-toggle" href="#" id="ReverseWrapperBase.set_error_return-toggle" onclick="return toggle('ReverseWrapperBase.set_error_return');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ReverseWrapperBase-class.html#set_error_return">set_error_return</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">error_return</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReverseWrapperBase.set_error_return-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReverseWrapperBase.set_error_return-expanded"><a name="L565"></a><tt class="py-lineno"> 565</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_return</tt> <tt class="py-op">=</tt> <tt class="py-name">error_return</tt> </tt>
<a name="L566"></a><tt class="py-lineno"> 566</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_call</tt><tt class="py-op">.</tt><tt class="py-name">error_return</tt> <tt class="py-op">=</tt> <tt class="py-name">error_return</tt> </tt>
<a name="L567"></a><tt class="py-lineno"> 567</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">after_call</tt><tt class="py-op">.</tt><tt class="py-name">error_return</tt> <tt class="py-op">=</tt> <tt class="py-name">error_return</tt> </tt>
</div><a name="L568"></a><tt class="py-lineno"> 568</tt>  <tt class="py-line"> </tt>
<a name="ReverseWrapperBase.reset_code_generation_state"></a><div id="ReverseWrapperBase.reset_code_generation_state-def"><a name="L569"></a><tt class="py-lineno"> 569</tt> <a class="py-toggle" href="#" id="ReverseWrapperBase.reset_code_generation_state-toggle" onclick="return toggle('ReverseWrapperBase.reset_code_generation_state');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ReverseWrapperBase-class.html#reset_code_generation_state">reset_code_generation_state</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReverseWrapperBase.reset_code_generation_state-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReverseWrapperBase.reset_code_generation_state-expanded"><a name="L570"></a><tt class="py-lineno"> 570</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt><tt class="py-op">.</tt><tt id="link-83" class="py-name"><a title="pybindgen.typehandlers.base.BuildValueParameters.clear
pybindgen.typehandlers.base.CodeBlock.clear
pybindgen.typehandlers.base.DeclarationsScope.clear
pybindgen.typehandlers.base.ParseTupleParameters.clear" class="py-name" href="#" onclick="return doclink('link-83', 'clear', 'link-60');">clear</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L571"></a><tt class="py-lineno"> 571</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_call</tt><tt class="py-op">.</tt><tt id="link-84" class="py-name"><a title="pybindgen.typehandlers.base.BuildValueParameters.clear
pybindgen.typehandlers.base.CodeBlock.clear
pybindgen.typehandlers.base.DeclarationsScope.clear
pybindgen.typehandlers.base.ParseTupleParameters.clear" class="py-name" href="#" onclick="return doclink('link-84', 'clear', 'link-60');">clear</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L572"></a><tt class="py-lineno"> 572</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">after_call</tt><tt class="py-op">.</tt><tt id="link-85" class="py-name"><a title="pybindgen.typehandlers.base.BuildValueParameters.clear
pybindgen.typehandlers.base.CodeBlock.clear
pybindgen.typehandlers.base.DeclarationsScope.clear
pybindgen.typehandlers.base.ParseTupleParameters.clear" class="py-name" href="#" onclick="return doclink('link-85', 'clear', 'link-60');">clear</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L573"></a><tt class="py-lineno"> 573</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">build_params</tt><tt class="py-op">.</tt><tt id="link-86" class="py-name"><a title="pybindgen.typehandlers.base.BuildValueParameters.clear
pybindgen.typehandlers.base.CodeBlock.clear
pybindgen.typehandlers.base.DeclarationsScope.clear
pybindgen.typehandlers.base.ParseTupleParameters.clear" class="py-name" href="#" onclick="return doclink('link-86', 'clear', 'link-60');">clear</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L574"></a><tt class="py-lineno"> 574</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parse_params</tt><tt class="py-op">.</tt><tt id="link-87" class="py-name"><a title="pybindgen.typehandlers.base.BuildValueParameters.clear
pybindgen.typehandlers.base.CodeBlock.clear
pybindgen.typehandlers.base.DeclarationsScope.clear
pybindgen.typehandlers.base.ParseTupleParameters.clear" class="py-name" href="#" onclick="return doclink('link-87', 'clear', 'link-60');">clear</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L575"></a><tt class="py-lineno"> 575</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generate_gil_code</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L576"></a><tt class="py-lineno"> 576</tt>  <tt class="py-line"> </tt>
<a name="ReverseWrapperBase._generate_gil_code"></a><div id="ReverseWrapperBase._generate_gil_code-def"><a name="L577"></a><tt class="py-lineno"> 577</tt> <a class="py-toggle" href="#" id="ReverseWrapperBase._generate_gil_code-toggle" onclick="return toggle('ReverseWrapperBase._generate_gil_code');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ReverseWrapperBase-class.html#_generate_gil_code">_generate_gil_code</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReverseWrapperBase._generate_gil_code-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReverseWrapperBase._generate_gil_code-expanded"><a name="L578"></a><tt class="py-lineno"> 578</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-88" class="py-name"><a title="pybindgen.converter_functions.PythonToCConverter.NO_GIL_LOCKING
pybindgen.cppattribute.PySetter.NO_GIL_LOCKING
pybindgen.typehandlers.base.ReverseWrapperBase.NO_GIL_LOCKING" class="py-name" href="#" onclick="return doclink('link-88', 'NO_GIL_LOCKING', 'link-71');">NO_GIL_LOCKING</a></tt><tt class="py-op">:</tt> </tt>
<a name="L579"></a><tt class="py-lineno"> 579</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L580"></a><tt class="py-lineno"> 580</tt>  <tt class="py-line">        <tt class="py-comment">## reverse wrappers are called from C/C++ code, when the Python GIL may not be held...</tt> </tt>
<a name="L581"></a><tt class="py-lineno"> 581</tt>  <tt class="py-line">        <tt class="py-name">gil_state_var</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt><tt class="py-op">.</tt><tt id="link-89" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.declare_variable
pybindgen.typehandlers.base.DeclarationsScope.declare_variable" class="py-name" href="#" onclick="return doclink('link-89', 'declare_variable', 'link-27');">declare_variable</a></tt><tt class="py-op">(</tt><tt class="py-string">'PyGILState_STATE'</tt><tt class="py-op">,</tt> <tt class="py-string">'__py_gil_state'</tt><tt class="py-op">)</tt> </tt>
<a name="L582"></a><tt class="py-lineno"> 582</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_call</tt><tt class="py-op">.</tt><tt id="link-90" class="py-name" targets="Method pybindgen.typehandlers.base.CodeBlock.write_code()=pybindgen.typehandlers.base.CodeBlock-class.html#write_code"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-90', 'write_code', 'link-90');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">'%s = (PyEval_ThreadsInitialized() ? PyGILState_Ensure() : (PyGILState_STATE) 0);'</tt> </tt>
<a name="L583"></a><tt class="py-lineno"> 583</tt>  <tt class="py-line">                                    <tt class="py-op">%</tt> <tt class="py-name">gil_state_var</tt><tt class="py-op">)</tt> </tt>
<a name="L584"></a><tt class="py-lineno"> 584</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_call</tt><tt class="py-op">.</tt><tt id="link-91" class="py-name" targets="Method pybindgen.typehandlers.base.CodeBlock.add_cleanup_code()=pybindgen.typehandlers.base.CodeBlock-class.html#add_cleanup_code"><a title="pybindgen.typehandlers.base.CodeBlock.add_cleanup_code" class="py-name" href="#" onclick="return doclink('link-91', 'add_cleanup_code', 'link-91');">add_cleanup_code</a></tt><tt class="py-op">(</tt><tt class="py-string">'if (PyEval_ThreadsInitialized())\n'</tt> </tt>
<a name="L585"></a><tt class="py-lineno"> 585</tt>  <tt class="py-line">                                          <tt class="py-string">'    PyGILState_Release(%s);'</tt> <tt class="py-op">%</tt> <tt class="py-name">gil_state_var</tt><tt class="py-op">)</tt> </tt>
</div><a name="L586"></a><tt class="py-lineno"> 586</tt>  <tt class="py-line"> </tt>
<a name="L587"></a><tt class="py-lineno"> 587</tt>  <tt class="py-line"> </tt>
<a name="ReverseWrapperBase.generate_python_call"></a><div id="ReverseWrapperBase.generate_python_call-def"><a name="L588"></a><tt class="py-lineno"> 588</tt> <a class="py-toggle" href="#" id="ReverseWrapperBase.generate_python_call-toggle" onclick="return toggle('ReverseWrapperBase.generate_python_call');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ReverseWrapperBase-class.html#generate_python_call">generate_python_call</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReverseWrapperBase.generate_python_call-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReverseWrapperBase.generate_python_call-expanded"><a name="L589"></a><tt class="py-lineno"> 589</tt>  <tt class="py-line">        <tt class="py-docstring">"""Generates the code (into self.before_call) to call into</tt> </tt>
<a name="L590"></a><tt class="py-lineno"> 590</tt>  <tt class="py-line"><tt class="py-docstring">        Python, storing the result in the variable 'py_retval'; should</tt> </tt>
<a name="L591"></a><tt class="py-lineno"> 591</tt>  <tt class="py-line"><tt class="py-docstring">        also check for call error.</tt> </tt>
<a name="L592"></a><tt class="py-lineno"> 592</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L593"></a><tt class="py-lineno"> 593</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt> </tt>
</div><a name="L594"></a><tt class="py-lineno"> 594</tt>  <tt class="py-line"> </tt>
<a name="ReverseWrapperBase.generate"></a><div id="ReverseWrapperBase.generate-def"><a name="L595"></a><tt class="py-lineno"> 595</tt> <a class="py-toggle" href="#" id="ReverseWrapperBase.generate-toggle" onclick="return toggle('ReverseWrapperBase.generate');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ReverseWrapperBase-class.html#generate">generate</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">,</tt> <tt class="py-param">wrapper_name</tt><tt class="py-op">,</tt> <tt class="py-param">decl_modifiers</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-string">'static'</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L596"></a><tt class="py-lineno"> 596</tt>  <tt class="py-line">                 <tt class="py-param">decl_post_modifiers</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReverseWrapperBase.generate-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReverseWrapperBase.generate-expanded"><a name="L597"></a><tt class="py-lineno"> 597</tt>  <tt class="py-line">        <tt class="py-docstring">"""Generate the wrapper</tt> </tt>
<a name="L598"></a><tt class="py-lineno"> 598</tt>  <tt class="py-line"><tt class="py-docstring">        @param code_sink: a CodeSink object that will receive the code</tt> </tt>
<a name="L599"></a><tt class="py-lineno"> 599</tt>  <tt class="py-line"><tt class="py-docstring">        @param wrapper_name: C/C++ identifier of the function/method to generate</tt> </tt>
<a name="L600"></a><tt class="py-lineno"> 600</tt>  <tt class="py-line"><tt class="py-docstring">        @param decl_modifiers: list of C/C++ declaration modifiers, e.g. 'static'</tt> </tt>
<a name="L601"></a><tt class="py-lineno"> 601</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L602"></a><tt class="py-lineno"> 602</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">decl_modifiers</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">,</tt> <tt class="py-name">tuple</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L603"></a><tt class="py-lineno"> 603</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt id="link-92" class="py-name"><a title="pybindgen.typehandlers.base.all" class="py-name" href="#" onclick="return doclink('link-92', 'all', 'link-3');">all</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">mod</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">mod</tt> <tt class="py-keyword">in</tt> <tt class="py-name">decl_modifiers</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L604"></a><tt class="py-lineno"> 604</tt>  <tt class="py-line"> </tt>
<a name="L605"></a><tt class="py-lineno"> 605</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt><tt class="py-op">.</tt><tt id="link-93" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.declare_variable
pybindgen.typehandlers.base.DeclarationsScope.declare_variable" class="py-name" href="#" onclick="return doclink('link-93', 'declare_variable', 'link-27');">declare_variable</a></tt><tt class="py-op">(</tt><tt class="py-string">'PyObject*'</tt><tt class="py-op">,</tt> <tt class="py-string">'py_retval'</tt><tt class="py-op">)</tt> </tt>
<a name="L606"></a><tt class="py-lineno"> 606</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">return_value</tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt> <tt class="py-op">!=</tt> <tt class="py-string">'void'</tt> \ </tt>
<a name="L607"></a><tt class="py-lineno"> 607</tt>  <tt class="py-line">                <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">return_value</tt><tt class="py-op">.</tt><tt id="link-94" class="py-name" targets="Variable pybindgen.cppclass_typehandlers.CppClassReturnValue.REQUIRES_ASSIGNMENT_CONSTRUCTOR=pybindgen.cppclass_typehandlers.CppClassReturnValue-class.html#REQUIRES_ASSIGNMENT_CONSTRUCTOR,Variable pybindgen.typehandlers.base.ReturnValue.REQUIRES_ASSIGNMENT_CONSTRUCTOR=pybindgen.typehandlers.base.ReturnValue-class.html#REQUIRES_ASSIGNMENT_CONSTRUCTOR"><a title="pybindgen.cppclass_typehandlers.CppClassReturnValue.REQUIRES_ASSIGNMENT_CONSTRUCTOR
pybindgen.typehandlers.base.ReturnValue.REQUIRES_ASSIGNMENT_CONSTRUCTOR" class="py-name" href="#" onclick="return doclink('link-94', 'REQUIRES_ASSIGNMENT_CONSTRUCTOR', 'link-94');">REQUIRES_ASSIGNMENT_CONSTRUCTOR</a></tt><tt class="py-op">:</tt> </tt>
<a name="L608"></a><tt class="py-lineno"> 608</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt><tt class="py-op">.</tt><tt id="link-95" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.declare_variable
pybindgen.typehandlers.base.DeclarationsScope.declare_variable" class="py-name" href="#" onclick="return doclink('link-95', 'declare_variable', 'link-27');">declare_variable</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">return_value</tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt><tt class="py-op">,</tt> <tt class="py-string">'retval'</tt><tt class="py-op">)</tt> </tt>
<a name="L609"></a><tt class="py-lineno"> 609</tt>  <tt class="py-line"> </tt>
<a name="L610"></a><tt class="py-lineno"> 610</tt>  <tt class="py-line">        <tt class="py-comment">## convert the input parameters</tt> </tt>
<a name="L611"></a><tt class="py-lineno"> 611</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-96" class="py-name"><a title="pybindgen.utils.param" class="py-name" href="#" onclick="return doclink('link-96', 'param', 'link-74');">param</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parameters</tt><tt class="py-op">:</tt> </tt>
<a name="L612"></a><tt class="py-lineno"> 612</tt>  <tt class="py-line">            <tt id="link-97" class="py-name"><a title="pybindgen.utils.param" class="py-name" href="#" onclick="return doclink('link-97', 'param', 'link-74');">param</a></tt><tt class="py-op">.</tt><tt id="link-98" class="py-name" targets="Method pybindgen.container.ContainerParameter.convert_c_to_python()=pybindgen.container.ContainerParameter-class.html#convert_c_to_python,Method pybindgen.container.ContainerPtrParameter.convert_c_to_python()=pybindgen.container.ContainerPtrParameter-class.html#convert_c_to_python,Method pybindgen.container.ContainerRefParameter.convert_c_to_python()=pybindgen.container.ContainerRefParameter-class.html#convert_c_to_python,Method pybindgen.container.ContainerReturnValue.convert_c_to_python()=pybindgen.container.ContainerReturnValue-class.html#convert_c_to_python,Method pybindgen.cppclass_typehandlers.CppClassParameter.convert_c_to_python()=pybindgen.cppclass_typehandlers.CppClassParameter-class.html#convert_c_to_python,Method pybindgen.cppclass_typehandlers.CppClassPtrParameter.convert_c_to_python()=pybindgen.cppclass_typehandlers.CppClassPtrParameter-class.html#convert_c_to_python,Method pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.convert_c_to_python()=pybindgen.cppclass_typehandlers.CppClassPtrReturnValue-class.html#convert_c_to_python,Method pybindgen.cppclass_typehandlers.CppClassRefParameter.convert_c_to_python()=pybindgen.cppclass_typehandlers.CppClassRefParameter-class.html#convert_c_to_python,Method pybindgen.cppclass_typehandlers.CppClassReturnValue.convert_c_to_python()=pybindgen.cppclass_typehandlers.CppClassReturnValue-class.html#convert_c_to_python,Method pybindgen.cppmethod.DummyParameter.convert_c_to_python()=pybindgen.cppmethod.DummyParameter-class.html#convert_c_to_python,Method pybindgen.cppmethod.DummyReturnValue.convert_c_to_python()=pybindgen.cppmethod.DummyReturnValue-class.html#convert_c_to_python,Method pybindgen.typehandlers.base.Parameter.convert_c_to_python()=pybindgen.typehandlers.base.Parameter-class.html#convert_c_to_python,Method pybindgen.typehandlers.base.ReturnValue.convert_c_to_python()=pybindgen.typehandlers.base.ReturnValue-class.html#convert_c_to_python,Method pybindgen.typehandlers.booltype.BoolParam.convert_c_to_python()=pybindgen.typehandlers.booltype.BoolParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.booltype.BoolPtrParam.convert_c_to_python()=pybindgen.typehandlers.booltype.BoolPtrParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.booltype.BoolRefParam.convert_c_to_python()=pybindgen.typehandlers.booltype.BoolRefParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.booltype.BoolReturn.convert_c_to_python()=pybindgen.typehandlers.booltype.BoolReturn-class.html#convert_c_to_python,Method pybindgen.typehandlers.doubletype.DoubleParam.convert_c_to_python()=pybindgen.typehandlers.doubletype.DoubleParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.doubletype.DoublePtrParam.convert_c_to_python()=pybindgen.typehandlers.doubletype.DoublePtrParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.doubletype.DoubleRefParam.convert_c_to_python()=pybindgen.typehandlers.doubletype.DoubleRefParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.doubletype.DoubleReturn.convert_c_to_python()=pybindgen.typehandlers.doubletype.DoubleReturn-class.html#convert_c_to_python,Method pybindgen.typehandlers.floattype.FloatParam.convert_c_to_python()=pybindgen.typehandlers.floattype.FloatParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.floattype.FloatPtrParam.convert_c_to_python()=pybindgen.typehandlers.floattype.FloatPtrParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.floattype.FloatRefParam.convert_c_to_python()=pybindgen.typehandlers.floattype.FloatRefParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.floattype.FloatReturn.convert_c_to_python()=pybindgen.typehandlers.floattype.FloatReturn-class.html#convert_c_to_python,Method pybindgen.typehandlers.inttype.Int16Param.convert_c_to_python()=pybindgen.typehandlers.inttype.Int16Param-class.html#convert_c_to_python,Method pybindgen.typehandlers.inttype.Int16Return.convert_c_to_python()=pybindgen.typehandlers.inttype.Int16Return-class.html#convert_c_to_python,Method pybindgen.typehandlers.inttype.Int8PtrParam.convert_c_to_python()=pybindgen.typehandlers.inttype.Int8PtrParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.inttype.IntParam.convert_c_to_python()=pybindgen.typehandlers.inttype.IntParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.inttype.IntPtrParam.convert_c_to_python()=pybindgen.typehandlers.inttype.IntPtrParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.inttype.IntRefParam.convert_c_to_python()=pybindgen.typehandlers.inttype.IntRefParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.inttype.IntReturn.convert_c_to_python()=pybindgen.typehandlers.inttype.IntReturn-class.html#convert_c_to_python,Method pybindgen.typehandlers.inttype.LongLongParam.convert_c_to_python()=pybindgen.typehandlers.inttype.LongLongParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.inttype.LongLongReturn.convert_c_to_python()=pybindgen.typehandlers.inttype.LongLongReturn-class.html#convert_c_to_python,Method pybindgen.typehandlers.inttype.SizeTParam.convert_c_to_python()=pybindgen.typehandlers.inttype.SizeTParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.inttype.SizeTReturn.convert_c_to_python()=pybindgen.typehandlers.inttype.SizeTReturn-class.html#convert_c_to_python,Method pybindgen.typehandlers.inttype.UInt16Param.convert_c_to_python()=pybindgen.typehandlers.inttype.UInt16Param-class.html#convert_c_to_python,Method pybindgen.typehandlers.inttype.UInt16Return.convert_c_to_python()=pybindgen.typehandlers.inttype.UInt16Return-class.html#convert_c_to_python,Method pybindgen.typehandlers.inttype.UInt8Param.convert_c_to_python()=pybindgen.typehandlers.inttype.UInt8Param-class.html#convert_c_to_python,Method pybindgen.typehandlers.inttype.UInt8PtrParam.convert_c_to_python()=pybindgen.typehandlers.inttype.UInt8PtrParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.inttype.UInt8Return.convert_c_to_python()=pybindgen.typehandlers.inttype.UInt8Return-class.html#convert_c_to_python,Method pybindgen.typehandlers.inttype.UnsignedIntParam.convert_c_to_python()=pybindgen.typehandlers.inttype.UnsignedIntParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.inttype.UnsignedIntPtrParam.convert_c_to_python()=pybindgen.typehandlers.inttype.UnsignedIntPtrParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.inttype.UnsignedIntReturn.convert_c_to_python()=pybindgen.typehandlers.inttype.UnsignedIntReturn-class.html#convert_c_to_python,Method pybindgen.typehandlers.inttype.UnsignedLongLongParam.convert_c_to_python()=pybindgen.typehandlers.inttype.UnsignedLongLongParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.inttype.UnsignedLongLongReturn.convert_c_to_python()=pybindgen.typehandlers.inttype.UnsignedLongLongReturn-class.html#convert_c_to_python,Method pybindgen.typehandlers.pyobjecttype.PyObjectParam.convert_c_to_python()=pybindgen.typehandlers.pyobjecttype.PyObjectParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.convert_c_to_python()=pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue-class.html#convert_c_to_python,Method pybindgen.typehandlers.stringtype.CStringParam.convert_c_to_python()=pybindgen.typehandlers.stringtype.CStringParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.stringtype.CStringReturn.convert_c_to_python()=pybindgen.typehandlers.stringtype.CStringReturn-class.html#convert_c_to_python,Method pybindgen.typehandlers.stringtype.CharParam.convert_c_to_python()=pybindgen.typehandlers.stringtype.CharParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.stringtype.CharReturn.convert_c_to_python()=pybindgen.typehandlers.stringtype.CharReturn-class.html#convert_c_to_python,Method pybindgen.typehandlers.stringtype.StdStringParam.convert_c_to_python()=pybindgen.typehandlers.stringtype.StdStringParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.stringtype.StdStringRefParam.convert_c_to_python()=pybindgen.typehandlers.stringtype.StdStringRefParam-class.html#convert_c_to_python,Method pybindgen.typehandlers.stringtype.StdStringReturn.convert_c_to_python()=pybindgen.typehandlers.stringtype.StdStringReturn-class.html#convert_c_to_python,Method pybindgen.typehandlers.voidtype.VoidReturn.convert_c_to_python()=pybindgen.typehandlers.voidtype.VoidReturn-class.html#convert_c_to_python"><a title="pybindgen.container.ContainerParameter.convert_c_to_python
pybindgen.container.ContainerPtrParameter.convert_c_to_python
pybindgen.container.ContainerRefParameter.convert_c_to_python
pybindgen.container.ContainerReturnValue.convert_c_to_python
pybindgen.cppclass_typehandlers.CppClassParameter.convert_c_to_python
pybindgen.cppclass_typehandlers.CppClassPtrParameter.convert_c_to_python
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.convert_c_to_python
pybindgen.cppclass_typehandlers.CppClassRefParameter.convert_c_to_python
pybindgen.cppclass_typehandlers.CppClassReturnValue.convert_c_to_python
pybindgen.cppmethod.DummyParameter.convert_c_to_python
pybindgen.cppmethod.DummyReturnValue.convert_c_to_python
pybindgen.typehandlers.base.Parameter.convert_c_to_python
pybindgen.typehandlers.base.ReturnValue.convert_c_to_python
pybindgen.typehandlers.booltype.BoolParam.convert_c_to_python
pybindgen.typehandlers.booltype.BoolPtrParam.convert_c_to_python
pybindgen.typehandlers.booltype.BoolRefParam.convert_c_to_python
pybindgen.typehandlers.booltype.BoolReturn.convert_c_to_python
pybindgen.typehandlers.doubletype.DoubleParam.convert_c_to_python
pybindgen.typehandlers.doubletype.DoublePtrParam.convert_c_to_python
pybindgen.typehandlers.doubletype.DoubleRefParam.convert_c_to_python
pybindgen.typehandlers.doubletype.DoubleReturn.convert_c_to_python
pybindgen.typehandlers.floattype.FloatParam.convert_c_to_python
pybindgen.typehandlers.floattype.FloatPtrParam.convert_c_to_python
pybindgen.typehandlers.floattype.FloatRefParam.convert_c_to_python
pybindgen.typehandlers.floattype.FloatReturn.convert_c_to_python
pybindgen.typehandlers.inttype.Int16Param.convert_c_to_python
pybindgen.typehandlers.inttype.Int16Return.convert_c_to_python
pybindgen.typehandlers.inttype.Int8PtrParam.convert_c_to_python
pybindgen.typehandlers.inttype.IntParam.convert_c_to_python
pybindgen.typehandlers.inttype.IntPtrParam.convert_c_to_python
pybindgen.typehandlers.inttype.IntRefParam.convert_c_to_python
pybindgen.typehandlers.inttype.IntReturn.convert_c_to_python
pybindgen.typehandlers.inttype.LongLongParam.convert_c_to_python
pybindgen.typehandlers.inttype.LongLongReturn.convert_c_to_python
pybindgen.typehandlers.inttype.SizeTParam.convert_c_to_python
pybindgen.typehandlers.inttype.SizeTReturn.convert_c_to_python
pybindgen.typehandlers.inttype.UInt16Param.convert_c_to_python
pybindgen.typehandlers.inttype.UInt16Return.convert_c_to_python
pybindgen.typehandlers.inttype.UInt8Param.convert_c_to_python
pybindgen.typehandlers.inttype.UInt8PtrParam.convert_c_to_python
pybindgen.typehandlers.inttype.UInt8Return.convert_c_to_python
pybindgen.typehandlers.inttype.UnsignedIntParam.convert_c_to_python
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.convert_c_to_python
pybindgen.typehandlers.inttype.UnsignedIntReturn.convert_c_to_python
pybindgen.typehandlers.inttype.UnsignedLongLongParam.convert_c_to_python
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.convert_c_to_python
pybindgen.typehandlers.pyobjecttype.PyObjectParam.convert_c_to_python
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.convert_c_to_python
pybindgen.typehandlers.stringtype.CStringParam.convert_c_to_python
pybindgen.typehandlers.stringtype.CStringReturn.convert_c_to_python
pybindgen.typehandlers.stringtype.CharParam.convert_c_to_python
pybindgen.typehandlers.stringtype.CharReturn.convert_c_to_python
pybindgen.typehandlers.stringtype.StdStringParam.convert_c_to_python
pybindgen.typehandlers.stringtype.StdStringRefParam.convert_c_to_python
pybindgen.typehandlers.stringtype.StdStringReturn.convert_c_to_python
pybindgen.typehandlers.voidtype.VoidReturn.convert_c_to_python" class="py-name" href="#" onclick="return doclink('link-98', 'convert_c_to_python', 'link-98');">convert_c_to_python</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L613"></a><tt class="py-lineno"> 613</tt>  <tt class="py-line"> </tt>
<a name="L614"></a><tt class="py-lineno"> 614</tt>  <tt class="py-line">        <tt class="py-comment">## generate_python_call should include something like</tt> </tt>
<a name="L615"></a><tt class="py-lineno"> 615</tt>  <tt class="py-line">        <tt class="py-comment">## self.after_call.write_error_check('py_retval == NULL')</tt> </tt>
<a name="L616"></a><tt class="py-lineno"> 616</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-99" class="py-name" targets="Method pybindgen.converter_functions.PythonToCConverter.generate_python_call()=pybindgen.converter_functions.PythonToCConverter-class.html#generate_python_call,Method pybindgen.cppattribute.PySetter.generate_python_call()=pybindgen.cppattribute.PySetter-class.html#generate_python_call,Method pybindgen.cppmethod.CppVirtualMethodProxy.generate_python_call()=pybindgen.cppmethod.CppVirtualMethodProxy-class.html#generate_python_call,Method pybindgen.typehandlers.base.ReverseWrapperBase.generate_python_call()=pybindgen.typehandlers.base.ReverseWrapperBase-class.html#generate_python_call"><a title="pybindgen.converter_functions.PythonToCConverter.generate_python_call
pybindgen.cppattribute.PySetter.generate_python_call
pybindgen.cppmethod.CppVirtualMethodProxy.generate_python_call
pybindgen.typehandlers.base.ReverseWrapperBase.generate_python_call" class="py-name" href="#" onclick="return doclink('link-99', 'generate_python_call', 'link-99');">generate_python_call</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L617"></a><tt class="py-lineno"> 617</tt>  <tt class="py-line"> </tt>
<a name="L618"></a><tt class="py-lineno"> 618</tt>  <tt class="py-line">        <tt class="py-comment">## convert the return value(s)</tt> </tt>
<a name="L619"></a><tt class="py-lineno"> 619</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">return_value</tt><tt class="py-op">.</tt><tt id="link-100" class="py-name" targets="Method pybindgen.container.ContainerParameter.convert_python_to_c()=pybindgen.container.ContainerParameter-class.html#convert_python_to_c,Method pybindgen.container.ContainerPtrParameter.convert_python_to_c()=pybindgen.container.ContainerPtrParameter-class.html#convert_python_to_c,Method pybindgen.container.ContainerRefParameter.convert_python_to_c()=pybindgen.container.ContainerRefParameter-class.html#convert_python_to_c,Method pybindgen.container.ContainerReturnValue.convert_python_to_c()=pybindgen.container.ContainerReturnValue-class.html#convert_python_to_c,Method pybindgen.cppclass_typehandlers.CppClassParameter.convert_python_to_c()=pybindgen.cppclass_typehandlers.CppClassParameter-class.html#convert_python_to_c,Method pybindgen.cppclass_typehandlers.CppClassPtrParameter.convert_python_to_c()=pybindgen.cppclass_typehandlers.CppClassPtrParameter-class.html#convert_python_to_c,Method pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.convert_python_to_c()=pybindgen.cppclass_typehandlers.CppClassPtrReturnValue-class.html#convert_python_to_c,Method pybindgen.cppclass_typehandlers.CppClassRefParameter.convert_python_to_c()=pybindgen.cppclass_typehandlers.CppClassRefParameter-class.html#convert_python_to_c,Method pybindgen.cppclass_typehandlers.CppClassReturnValue.convert_python_to_c()=pybindgen.cppclass_typehandlers.CppClassReturnValue-class.html#convert_python_to_c,Method pybindgen.cppmethod.DummyParameter.convert_python_to_c()=pybindgen.cppmethod.DummyParameter-class.html#convert_python_to_c,Method pybindgen.cppmethod.DummyReturnValue.convert_python_to_c()=pybindgen.cppmethod.DummyReturnValue-class.html#convert_python_to_c,Method pybindgen.typehandlers.base.Parameter.convert_python_to_c()=pybindgen.typehandlers.base.Parameter-class.html#convert_python_to_c,Method pybindgen.typehandlers.base.ReturnValue.convert_python_to_c()=pybindgen.typehandlers.base.ReturnValue-class.html#convert_python_to_c,Method pybindgen.typehandlers.booltype.BoolParam.convert_python_to_c()=pybindgen.typehandlers.booltype.BoolParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.booltype.BoolPtrParam.convert_python_to_c()=pybindgen.typehandlers.booltype.BoolPtrParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.booltype.BoolRefParam.convert_python_to_c()=pybindgen.typehandlers.booltype.BoolRefParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.booltype.BoolReturn.convert_python_to_c()=pybindgen.typehandlers.booltype.BoolReturn-class.html#convert_python_to_c,Method pybindgen.typehandlers.doubletype.DoubleParam.convert_python_to_c()=pybindgen.typehandlers.doubletype.DoubleParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.doubletype.DoublePtrParam.convert_python_to_c()=pybindgen.typehandlers.doubletype.DoublePtrParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.doubletype.DoubleRefParam.convert_python_to_c()=pybindgen.typehandlers.doubletype.DoubleRefParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.doubletype.DoubleReturn.convert_python_to_c()=pybindgen.typehandlers.doubletype.DoubleReturn-class.html#convert_python_to_c,Method pybindgen.typehandlers.floattype.FloatParam.convert_python_to_c()=pybindgen.typehandlers.floattype.FloatParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.floattype.FloatPtrParam.convert_python_to_c()=pybindgen.typehandlers.floattype.FloatPtrParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.floattype.FloatRefParam.convert_python_to_c()=pybindgen.typehandlers.floattype.FloatRefParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.floattype.FloatReturn.convert_python_to_c()=pybindgen.typehandlers.floattype.FloatReturn-class.html#convert_python_to_c,Method pybindgen.typehandlers.inttype.Int16Param.convert_python_to_c()=pybindgen.typehandlers.inttype.Int16Param-class.html#convert_python_to_c,Method pybindgen.typehandlers.inttype.Int16Return.convert_python_to_c()=pybindgen.typehandlers.inttype.Int16Return-class.html#convert_python_to_c,Method pybindgen.typehandlers.inttype.Int8PtrParam.convert_python_to_c()=pybindgen.typehandlers.inttype.Int8PtrParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.inttype.IntParam.convert_python_to_c()=pybindgen.typehandlers.inttype.IntParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.inttype.IntPtrParam.convert_python_to_c()=pybindgen.typehandlers.inttype.IntPtrParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.inttype.IntRefParam.convert_python_to_c()=pybindgen.typehandlers.inttype.IntRefParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.inttype.IntReturn.convert_python_to_c()=pybindgen.typehandlers.inttype.IntReturn-class.html#convert_python_to_c,Method pybindgen.typehandlers.inttype.LongLongParam.convert_python_to_c()=pybindgen.typehandlers.inttype.LongLongParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.inttype.LongLongReturn.convert_python_to_c()=pybindgen.typehandlers.inttype.LongLongReturn-class.html#convert_python_to_c,Method pybindgen.typehandlers.inttype.SizeTParam.convert_python_to_c()=pybindgen.typehandlers.inttype.SizeTParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.inttype.SizeTReturn.convert_python_to_c()=pybindgen.typehandlers.inttype.SizeTReturn-class.html#convert_python_to_c,Method pybindgen.typehandlers.inttype.UInt16Param.convert_python_to_c()=pybindgen.typehandlers.inttype.UInt16Param-class.html#convert_python_to_c,Method pybindgen.typehandlers.inttype.UInt16Return.convert_python_to_c()=pybindgen.typehandlers.inttype.UInt16Return-class.html#convert_python_to_c,Method pybindgen.typehandlers.inttype.UInt8Param.convert_python_to_c()=pybindgen.typehandlers.inttype.UInt8Param-class.html#convert_python_to_c,Method pybindgen.typehandlers.inttype.UInt8PtrParam.convert_python_to_c()=pybindgen.typehandlers.inttype.UInt8PtrParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.inttype.UInt8Return.convert_python_to_c()=pybindgen.typehandlers.inttype.UInt8Return-class.html#convert_python_to_c,Method pybindgen.typehandlers.inttype.UnsignedIntParam.convert_python_to_c()=pybindgen.typehandlers.inttype.UnsignedIntParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.inttype.UnsignedIntPtrParam.convert_python_to_c()=pybindgen.typehandlers.inttype.UnsignedIntPtrParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.inttype.UnsignedIntReturn.convert_python_to_c()=pybindgen.typehandlers.inttype.UnsignedIntReturn-class.html#convert_python_to_c,Method pybindgen.typehandlers.inttype.UnsignedLongLongParam.convert_python_to_c()=pybindgen.typehandlers.inttype.UnsignedLongLongParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.inttype.UnsignedLongLongReturn.convert_python_to_c()=pybindgen.typehandlers.inttype.UnsignedLongLongReturn-class.html#convert_python_to_c,Method pybindgen.typehandlers.pyobjecttype.PyObjectParam.convert_python_to_c()=pybindgen.typehandlers.pyobjecttype.PyObjectParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.convert_python_to_c()=pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue-class.html#convert_python_to_c,Method pybindgen.typehandlers.stringtype.CStringParam.convert_python_to_c()=pybindgen.typehandlers.stringtype.CStringParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.stringtype.CStringReturn.convert_python_to_c()=pybindgen.typehandlers.stringtype.CStringReturn-class.html#convert_python_to_c,Method pybindgen.typehandlers.stringtype.CharParam.convert_python_to_c()=pybindgen.typehandlers.stringtype.CharParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.stringtype.CharReturn.convert_python_to_c()=pybindgen.typehandlers.stringtype.CharReturn-class.html#convert_python_to_c,Method pybindgen.typehandlers.stringtype.StdStringParam.convert_python_to_c()=pybindgen.typehandlers.stringtype.StdStringParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.stringtype.StdStringRefParam.convert_python_to_c()=pybindgen.typehandlers.stringtype.StdStringRefParam-class.html#convert_python_to_c,Method pybindgen.typehandlers.stringtype.StdStringReturn.convert_python_to_c()=pybindgen.typehandlers.stringtype.StdStringReturn-class.html#convert_python_to_c,Method pybindgen.typehandlers.voidtype.VoidReturn.convert_python_to_c()=pybindgen.typehandlers.voidtype.VoidReturn-class.html#convert_python_to_c"><a title="pybindgen.container.ContainerParameter.convert_python_to_c
pybindgen.container.ContainerPtrParameter.convert_python_to_c
pybindgen.container.ContainerRefParameter.convert_python_to_c
pybindgen.container.ContainerReturnValue.convert_python_to_c
pybindgen.cppclass_typehandlers.CppClassParameter.convert_python_to_c
pybindgen.cppclass_typehandlers.CppClassPtrParameter.convert_python_to_c
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.convert_python_to_c
pybindgen.cppclass_typehandlers.CppClassRefParameter.convert_python_to_c
pybindgen.cppclass_typehandlers.CppClassReturnValue.convert_python_to_c
pybindgen.cppmethod.DummyParameter.convert_python_to_c
pybindgen.cppmethod.DummyReturnValue.convert_python_to_c
pybindgen.typehandlers.base.Parameter.convert_python_to_c
pybindgen.typehandlers.base.ReturnValue.convert_python_to_c
pybindgen.typehandlers.booltype.BoolParam.convert_python_to_c
pybindgen.typehandlers.booltype.BoolPtrParam.convert_python_to_c
pybindgen.typehandlers.booltype.BoolRefParam.convert_python_to_c
pybindgen.typehandlers.booltype.BoolReturn.convert_python_to_c
pybindgen.typehandlers.doubletype.DoubleParam.convert_python_to_c
pybindgen.typehandlers.doubletype.DoublePtrParam.convert_python_to_c
pybindgen.typehandlers.doubletype.DoubleRefParam.convert_python_to_c
pybindgen.typehandlers.doubletype.DoubleReturn.convert_python_to_c
pybindgen.typehandlers.floattype.FloatParam.convert_python_to_c
pybindgen.typehandlers.floattype.FloatPtrParam.convert_python_to_c
pybindgen.typehandlers.floattype.FloatRefParam.convert_python_to_c
pybindgen.typehandlers.floattype.FloatReturn.convert_python_to_c
pybindgen.typehandlers.inttype.Int16Param.convert_python_to_c
pybindgen.typehandlers.inttype.Int16Return.convert_python_to_c
pybindgen.typehandlers.inttype.Int8PtrParam.convert_python_to_c
pybindgen.typehandlers.inttype.IntParam.convert_python_to_c
pybindgen.typehandlers.inttype.IntPtrParam.convert_python_to_c
pybindgen.typehandlers.inttype.IntRefParam.convert_python_to_c
pybindgen.typehandlers.inttype.IntReturn.convert_python_to_c
pybindgen.typehandlers.inttype.LongLongParam.convert_python_to_c
pybindgen.typehandlers.inttype.LongLongReturn.convert_python_to_c
pybindgen.typehandlers.inttype.SizeTParam.convert_python_to_c
pybindgen.typehandlers.inttype.SizeTReturn.convert_python_to_c
pybindgen.typehandlers.inttype.UInt16Param.convert_python_to_c
pybindgen.typehandlers.inttype.UInt16Return.convert_python_to_c
pybindgen.typehandlers.inttype.UInt8Param.convert_python_to_c
pybindgen.typehandlers.inttype.UInt8PtrParam.convert_python_to_c
pybindgen.typehandlers.inttype.UInt8Return.convert_python_to_c
pybindgen.typehandlers.inttype.UnsignedIntParam.convert_python_to_c
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.convert_python_to_c
pybindgen.typehandlers.inttype.UnsignedIntReturn.convert_python_to_c
pybindgen.typehandlers.inttype.UnsignedLongLongParam.convert_python_to_c
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.convert_python_to_c
pybindgen.typehandlers.pyobjecttype.PyObjectParam.convert_python_to_c
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.convert_python_to_c
pybindgen.typehandlers.stringtype.CStringParam.convert_python_to_c
pybindgen.typehandlers.stringtype.CStringReturn.convert_python_to_c
pybindgen.typehandlers.stringtype.CharParam.convert_python_to_c
pybindgen.typehandlers.stringtype.CharReturn.convert_python_to_c
pybindgen.typehandlers.stringtype.StdStringParam.convert_python_to_c
pybindgen.typehandlers.stringtype.StdStringRefParam.convert_python_to_c
pybindgen.typehandlers.stringtype.StdStringReturn.convert_python_to_c
pybindgen.typehandlers.voidtype.VoidReturn.convert_python_to_c" class="py-name" href="#" onclick="return doclink('link-100', 'convert_python_to_c', 'link-100');">convert_python_to_c</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L620"></a><tt class="py-lineno"> 620</tt>  <tt class="py-line"> </tt>
<a name="L621"></a><tt class="py-lineno"> 621</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parse_params</tt><tt class="py-op">.</tt><tt id="link-101" class="py-name" targets="Method pybindgen.typehandlers.base.ParseTupleParameters.is_empty()=pybindgen.typehandlers.base.ParseTupleParameters-class.html#is_empty"><a title="pybindgen.typehandlers.base.ParseTupleParameters.is_empty" class="py-name" href="#" onclick="return doclink('link-101', 'is_empty', 'link-101');">is_empty</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L622"></a><tt class="py-lineno"> 622</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_call</tt><tt class="py-op">.</tt><tt id="link-102" class="py-name" targets="Method pybindgen.typehandlers.base.CodeBlock.write_error_check()=pybindgen.typehandlers.base.CodeBlock-class.html#write_error_check"><a title="pybindgen.typehandlers.base.CodeBlock.write_error_check" class="py-name" href="#" onclick="return doclink('link-102', 'write_error_check', 'link-102');">write_error_check</a></tt><tt class="py-op">(</tt><tt class="py-string">'py_retval != Py_None'</tt><tt class="py-op">,</tt> </tt>
<a name="L623"></a><tt class="py-lineno"> 623</tt>  <tt class="py-line">                                               <tt class="py-string">'PyErr_SetString(PyExc_TypeError, "function/method should return None");'</tt><tt class="py-op">)</tt> </tt>
<a name="L624"></a><tt class="py-lineno"> 624</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L625"></a><tt class="py-lineno"> 625</tt>  <tt class="py-line">            <tt class="py-comment">## parse the return value</tt> </tt>
<a name="L626"></a><tt class="py-lineno"> 626</tt>  <tt class="py-line">            <tt class="py-comment">## this ensures that py_retval is always a tuple</tt> </tt>
<a name="L627"></a><tt class="py-lineno"> 627</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_call</tt><tt class="py-op">.</tt><tt id="link-103" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-103', 'write_code', 'link-90');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">'py_retval = Py_BuildValue((char*) "(N)", py_retval);'</tt><tt class="py-op">)</tt> </tt>
<a name="L628"></a><tt class="py-lineno"> 628</tt>  <tt class="py-line"> </tt>
<a name="L629"></a><tt class="py-lineno"> 629</tt>  <tt class="py-line">            <tt class="py-name">parse_tuple_params</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'py_retval'</tt><tt class="py-op">]</tt> </tt>
<a name="L630"></a><tt class="py-lineno"> 630</tt>  <tt class="py-line">            <tt class="py-name">parse_params</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parse_params</tt><tt class="py-op">.</tt><tt id="link-104" class="py-name"><a title="pybindgen.typehandlers.base.BuildValueParameters.get_parameters
pybindgen.typehandlers.base.ParseTupleParameters.get_parameters" class="py-name" href="#" onclick="return doclink('link-104', 'get_parameters', 'link-51');">get_parameters</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L631"></a><tt class="py-lineno"> 631</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt class="py-name">parse_params</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'"'</tt> </tt>
<a name="L632"></a><tt class="py-lineno"> 632</tt>  <tt class="py-line">            <tt class="py-name">parse_params</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'(char *) '</tt> <tt class="py-op">+</tt> <tt class="py-name">parse_params</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L633"></a><tt class="py-lineno"> 633</tt>  <tt class="py-line">            <tt class="py-name">parse_tuple_params</tt><tt class="py-op">.</tt><tt class="py-name">extend</tt><tt class="py-op">(</tt><tt class="py-name">parse_params</tt><tt class="py-op">)</tt> </tt>
<a name="L634"></a><tt class="py-lineno"> 634</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_call</tt><tt class="py-op">.</tt><tt id="link-105" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_error_check" class="py-name" href="#" onclick="return doclink('link-105', 'write_error_check', 'link-102');">write_error_check</a></tt><tt class="py-op">(</tt><tt class="py-string">'!PyArg_ParseTuple(%s)'</tt> <tt class="py-op">%</tt> </tt>
<a name="L635"></a><tt class="py-lineno"> 635</tt>  <tt class="py-line">                                               <tt class="py-op">(</tt><tt class="py-string">', '</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">parse_tuple_params</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L636"></a><tt class="py-lineno"> 636</tt>  <tt class="py-line">                                               <tt class="py-name">failure_cleanup</tt><tt class="py-op">=</tt><tt class="py-string">'PyErr_Print();'</tt><tt class="py-op">)</tt> </tt>
<a name="L637"></a><tt class="py-lineno"> 637</tt>  <tt class="py-line"> </tt>
<a name="L638"></a><tt class="py-lineno"> 638</tt>  <tt class="py-line">        <tt class="py-comment">## cleanup and return</tt> </tt>
<a name="L639"></a><tt class="py-lineno"> 639</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">after_call</tt><tt class="py-op">.</tt><tt id="link-106" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_cleanup" class="py-name" href="#" onclick="return doclink('link-106', 'write_cleanup', 'link-49');">write_cleanup</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L640"></a><tt class="py-lineno"> 640</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">return_value</tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt> <tt class="py-op">==</tt> <tt class="py-string">'void'</tt><tt class="py-op">:</tt> </tt>
<a name="L641"></a><tt class="py-lineno"> 641</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">after_call</tt><tt class="py-op">.</tt><tt id="link-107" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-107', 'write_code', 'link-90');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">'return;'</tt><tt class="py-op">)</tt> </tt>
<a name="L642"></a><tt class="py-lineno"> 642</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L643"></a><tt class="py-lineno"> 643</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">after_call</tt><tt class="py-op">.</tt><tt id="link-108" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-108', 'write_code', 'link-90');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">'return retval;'</tt><tt class="py-op">)</tt> </tt>
<a name="L644"></a><tt class="py-lineno"> 644</tt>  <tt class="py-line"> </tt>
<a name="L645"></a><tt class="py-lineno"> 645</tt>  <tt class="py-line">        <tt class="py-comment">## now write out the wrapper function itself</tt> </tt>
<a name="L646"></a><tt class="py-lineno"> 646</tt>  <tt class="py-line"> </tt>
<a name="L647"></a><tt class="py-lineno"> 647</tt>  <tt class="py-line">        <tt class="py-comment">## open function</tt> </tt>
<a name="L648"></a><tt class="py-lineno"> 648</tt>  <tt class="py-line">        <tt class="py-name">retline</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">decl_modifiers</tt><tt class="py-op">)</tt> </tt>
<a name="L649"></a><tt class="py-lineno"> 649</tt>  <tt class="py-line">        <tt class="py-name">retline</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">return_value</tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt><tt class="py-op">)</tt> </tt>
<a name="L650"></a><tt class="py-lineno"> 650</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-109" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-109', 'writeln', 'link-29');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">' '</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">retline</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L651"></a><tt class="py-lineno"> 651</tt>  <tt class="py-line"> </tt>
<a name="L652"></a><tt class="py-lineno"> 652</tt>  <tt class="py-line">        <tt class="py-name">params_list</tt> <tt class="py-op">=</tt> <tt class="py-string">', '</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt id="link-110" class="py-name"><a title="pybindgen.typehandlers.base.join_ctype_and_name" class="py-name" href="#" onclick="return doclink('link-110', 'join_ctype_and_name', 'link-65');">join_ctype_and_name</a></tt><tt class="py-op">(</tt><tt id="link-111" class="py-name"><a title="pybindgen.utils.param" class="py-name" href="#" onclick="return doclink('link-111', 'param', 'link-74');">param</a></tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt><tt class="py-op">,</tt> <tt id="link-112" class="py-name"><a title="pybindgen.utils.param" class="py-name" href="#" onclick="return doclink('link-112', 'param', 'link-74');">param</a></tt><tt class="py-op">.</tt><tt id="link-113" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-113', 'name', 'link-4');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L653"></a><tt class="py-lineno"> 653</tt>  <tt class="py-line">                                 <tt class="py-keyword">for</tt> <tt id="link-114" class="py-name"><a title="pybindgen.utils.param" class="py-name" href="#" onclick="return doclink('link-114', 'param', 'link-74');">param</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parameters</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L654"></a><tt class="py-lineno"> 654</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-115" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-115', 'writeln', 'link-29');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s(%s)%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">wrapper_name</tt><tt class="py-op">,</tt> <tt class="py-name">params_list</tt><tt class="py-op">,</tt> </tt>
<a name="L655"></a><tt class="py-lineno"> 655</tt>  <tt class="py-line">                                        <tt class="py-string">' '</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">decl_post_modifiers</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L656"></a><tt class="py-lineno"> 656</tt>  <tt class="py-line"> </tt>
<a name="L657"></a><tt class="py-lineno"> 657</tt>  <tt class="py-line">        <tt class="py-comment">## body</tt> </tt>
<a name="L658"></a><tt class="py-lineno"> 658</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-116" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-116', 'writeln', 'link-29');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">'{'</tt><tt class="py-op">)</tt> </tt>
<a name="L659"></a><tt class="py-lineno"> 659</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-117" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.indent
pybindgen.typehandlers.codesink.CodeSink.indent" class="py-name" href="#" onclick="return doclink('link-117', 'indent', 'link-30');">indent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L660"></a><tt class="py-lineno"> 660</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt><tt class="py-op">.</tt><tt id="link-118" class="py-name" targets="Method pybindgen.typehandlers.base.DeclarationsScope.get_code_sink()=pybindgen.typehandlers.base.DeclarationsScope-class.html#get_code_sink"><a title="pybindgen.typehandlers.base.DeclarationsScope.get_code_sink" class="py-name" href="#" onclick="return doclink('link-118', 'get_code_sink', 'link-118');">get_code_sink</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-119" class="py-name" targets="Method pybindgen.typehandlers.codesink.MemoryCodeSink.flush_to()=pybindgen.typehandlers.codesink.MemoryCodeSink-class.html#flush_to,Method pybindgen.typehandlers.codesink.NullCodeSink.flush_to()=pybindgen.typehandlers.codesink.NullCodeSink-class.html#flush_to"><a title="pybindgen.typehandlers.codesink.MemoryCodeSink.flush_to
pybindgen.typehandlers.codesink.NullCodeSink.flush_to" class="py-name" href="#" onclick="return doclink('link-119', 'flush_to', 'link-119');">flush_to</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L661"></a><tt class="py-lineno"> 661</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-120" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-120', 'writeln', 'link-29');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L662"></a><tt class="py-lineno"> 662</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_call</tt><tt class="py-op">.</tt><tt class="py-name">sink</tt><tt class="py-op">.</tt><tt id="link-121" class="py-name"><a title="pybindgen.typehandlers.codesink.MemoryCodeSink.flush_to
pybindgen.typehandlers.codesink.NullCodeSink.flush_to" class="py-name" href="#" onclick="return doclink('link-121', 'flush_to', 'link-119');">flush_to</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L663"></a><tt class="py-lineno"> 663</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">after_call</tt><tt class="py-op">.</tt><tt class="py-name">sink</tt><tt class="py-op">.</tt><tt id="link-122" class="py-name"><a title="pybindgen.typehandlers.codesink.MemoryCodeSink.flush_to
pybindgen.typehandlers.codesink.NullCodeSink.flush_to" class="py-name" href="#" onclick="return doclink('link-122', 'flush_to', 'link-119');">flush_to</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L664"></a><tt class="py-lineno"> 664</tt>  <tt class="py-line"> </tt>
<a name="L665"></a><tt class="py-lineno"> 665</tt>  <tt class="py-line">        <tt class="py-comment">## close function</tt> </tt>
<a name="L666"></a><tt class="py-lineno"> 666</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-123" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.unindent
pybindgen.typehandlers.codesink.CodeSink.unindent" class="py-name" href="#" onclick="return doclink('link-123', 'unindent', 'link-31');">unindent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L667"></a><tt class="py-lineno"> 667</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-124" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-124', 'writeln', 'link-29');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">'}'</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L668"></a><tt class="py-lineno"> 668</tt>  <tt class="py-line"> </tt>
<a name="L669"></a><tt class="py-lineno"> 669</tt>  <tt class="py-line"> </tt>
<a name="L670"></a><tt class="py-lineno"> 670</tt>  <tt class="py-line"> </tt>
<a name="ForwardWrapperBase"></a><div id="ForwardWrapperBase-def"><a name="L671"></a><tt class="py-lineno"> 671</tt> <a class="py-toggle" href="#" id="ForwardWrapperBase-toggle" onclick="return toggle('ForwardWrapperBase');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ForwardWrapperBase-class.html">ForwardWrapperBase</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ForwardWrapperBase-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="ForwardWrapperBase-expanded"><a name="L672"></a><tt class="py-lineno"> 672</tt>  <tt class="py-line">    <tt class="py-docstring">"""Generic base for all forward wrapper generators.</tt> </tt>
<a name="L673"></a><tt class="py-lineno"> 673</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L674"></a><tt class="py-lineno"> 674</tt>  <tt class="py-line"><tt class="py-docstring">    Forward wrappers all have the following general structure in common:</tt> </tt>
<a name="L675"></a><tt class="py-lineno"> 675</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L676"></a><tt class="py-lineno"> 676</tt>  <tt class="py-line"><tt class="py-docstring">     1. 'declarations' -- variable declarations; for compatibility with</tt> </tt>
<a name="L677"></a><tt class="py-lineno"> 677</tt>  <tt class="py-line"><tt class="py-docstring">       older C compilers it is very important that all declarations</tt> </tt>
<a name="L678"></a><tt class="py-lineno"> 678</tt>  <tt class="py-line"><tt class="py-docstring">       come before any simple statement.  Declarations can be added</tt> </tt>
<a name="L679"></a><tt class="py-lineno"> 679</tt>  <tt class="py-line"><tt class="py-docstring">       with the add_declaration() method on the 'declarations'</tt> </tt>
<a name="L680"></a><tt class="py-lineno"> 680</tt>  <tt class="py-line"><tt class="py-docstring">       attribute.  Two standard declarations are always predeclared:</tt> </tt>
<a name="L681"></a><tt class="py-lineno"> 681</tt>  <tt class="py-line"><tt class="py-docstring">       '&lt;return-type&gt; retval', unless return-type is void, and 'PyObject</tt> </tt>
<a name="L682"></a><tt class="py-lineno"> 682</tt>  <tt class="py-line"><tt class="py-docstring">       *py_retval';</tt> </tt>
<a name="L683"></a><tt class="py-lineno"> 683</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L684"></a><tt class="py-lineno"> 684</tt>  <tt class="py-line"><tt class="py-docstring">     2. 'code before parse' -- code before the</tt> </tt>
<a name="L685"></a><tt class="py-lineno"> 685</tt>  <tt class="py-line"><tt class="py-docstring">       PyArg_ParseTupleAndKeywords call; code can be freely added to</tt> </tt>
<a name="L686"></a><tt class="py-lineno"> 686</tt>  <tt class="py-line"><tt class="py-docstring">       it by accessing the 'before_parse' (a CodeBlock instance)</tt> </tt>
<a name="L687"></a><tt class="py-lineno"> 687</tt>  <tt class="py-line"><tt class="py-docstring">       attribute;</tt> </tt>
<a name="L688"></a><tt class="py-lineno"> 688</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L689"></a><tt class="py-lineno"> 689</tt>  <tt class="py-line"><tt class="py-docstring">     3. A PyArg_ParseTupleAndKeywords call; uses items from the</tt> </tt>
<a name="L690"></a><tt class="py-lineno"> 690</tt>  <tt class="py-line"><tt class="py-docstring">       parse_params object;</tt> </tt>
<a name="L691"></a><tt class="py-lineno"> 691</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L692"></a><tt class="py-lineno"> 692</tt>  <tt class="py-line"><tt class="py-docstring">     4. 'code before call' -- this is a code block dedicated to contain</tt> </tt>
<a name="L693"></a><tt class="py-lineno"> 693</tt>  <tt class="py-line"><tt class="py-docstring">       all code that is needed before calling the C function; code can be</tt> </tt>
<a name="L694"></a><tt class="py-lineno"> 694</tt>  <tt class="py-line"><tt class="py-docstring">       freely added to it by accessing the 'before_call' (a CodeBlock</tt> </tt>
<a name="L695"></a><tt class="py-lineno"> 695</tt>  <tt class="py-line"><tt class="py-docstring">       instance) attribute;</tt> </tt>
<a name="L696"></a><tt class="py-lineno"> 696</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L697"></a><tt class="py-lineno"> 697</tt>  <tt class="py-line"><tt class="py-docstring">     5. 'call into C' -- this is realized by a C/C++ call; the list of</tt> </tt>
<a name="L698"></a><tt class="py-lineno"> 698</tt>  <tt class="py-line"><tt class="py-docstring">       parameters that should be used is in the 'call_params' wrapper</tt> </tt>
<a name="L699"></a><tt class="py-lineno"> 699</tt>  <tt class="py-line"><tt class="py-docstring">       attribute;</tt> </tt>
<a name="L700"></a><tt class="py-lineno"> 700</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L701"></a><tt class="py-lineno"> 701</tt>  <tt class="py-line"><tt class="py-docstring">     6. 'code after call' -- this is a code block dedicated to contain</tt> </tt>
<a name="L702"></a><tt class="py-lineno"> 702</tt>  <tt class="py-line"><tt class="py-docstring">       all code that must come after calling into Python; code can be</tt> </tt>
<a name="L703"></a><tt class="py-lineno"> 703</tt>  <tt class="py-line"><tt class="py-docstring">       freely added to it by accessing the 'after_call' (a CodeBlock</tt> </tt>
<a name="L704"></a><tt class="py-lineno"> 704</tt>  <tt class="py-line"><tt class="py-docstring">       instance) attribute;</tt> </tt>
<a name="L705"></a><tt class="py-lineno"> 705</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L706"></a><tt class="py-lineno"> 706</tt>  <tt class="py-line"><tt class="py-docstring">     7. A py_retval = Py_BuildValue(...) call; this call can be</tt> </tt>
<a name="L707"></a><tt class="py-lineno"> 707</tt>  <tt class="py-line"><tt class="py-docstring">       customized, so that out/inout parameters can add additional</tt> </tt>
<a name="L708"></a><tt class="py-lineno"> 708</tt>  <tt class="py-line"><tt class="py-docstring">       return values, by accessing the 'build_params' (a</tt> </tt>
<a name="L709"></a><tt class="py-lineno"> 709</tt>  <tt class="py-line"><tt class="py-docstring">       BuildValueParameters instance) attribute;</tt> </tt>
<a name="L710"></a><tt class="py-lineno"> 710</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L711"></a><tt class="py-lineno"> 711</tt>  <tt class="py-line"><tt class="py-docstring">     8. Cleanup and return.</tt> </tt>
<a name="L712"></a><tt class="py-lineno"> 712</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L713"></a><tt class="py-lineno"> 713</tt>  <tt class="py-line"><tt class="py-docstring">    Object constructors cannot return values, and so the step 7 is to</tt> </tt>
<a name="L714"></a><tt class="py-lineno"> 714</tt>  <tt class="py-line"><tt class="py-docstring">    be omitted for them.</tt> </tt>
<a name="L715"></a><tt class="py-lineno"> 715</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L716"></a><tt class="py-lineno"> 716</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L717"></a><tt class="py-lineno"> 717</tt>  <tt class="py-line"> </tt>
<a name="L718"></a><tt class="py-lineno"> 718</tt>  <tt class="py-line">    <tt id="link-125" class="py-name" targets="Variable pybindgen.typehandlers.base.ForwardWrapperBase.PARSE_TUPLE=pybindgen.typehandlers.base.ForwardWrapperBase-class.html#PARSE_TUPLE"><a title="pybindgen.typehandlers.base.ForwardWrapperBase.PARSE_TUPLE" class="py-name" href="#" onclick="return doclink('link-125', 'PARSE_TUPLE', 'link-125');">PARSE_TUPLE</a></tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt>
<a name="L719"></a><tt class="py-lineno"> 719</tt>  <tt class="py-line">    <tt id="link-126" class="py-name" targets="Variable pybindgen.typehandlers.base.ForwardWrapperBase.PARSE_TUPLE_AND_KEYWORDS=pybindgen.typehandlers.base.ForwardWrapperBase-class.html#PARSE_TUPLE_AND_KEYWORDS"><a title="pybindgen.typehandlers.base.ForwardWrapperBase.PARSE_TUPLE_AND_KEYWORDS" class="py-name" href="#" onclick="return doclink('link-126', 'PARSE_TUPLE_AND_KEYWORDS', 'link-126');">PARSE_TUPLE_AND_KEYWORDS</a></tt> <tt class="py-op">=</tt> <tt class="py-number">2</tt> </tt>
<a name="L720"></a><tt class="py-lineno"> 720</tt>  <tt class="py-line"> </tt>
<a name="L721"></a><tt class="py-lineno"> 721</tt>  <tt class="py-line">    <tt id="link-127" class="py-name" targets="Variable pybindgen.container.IterNextWrapper.HAVE_RETURN_VALUE=pybindgen.container.IterNextWrapper-class.html#HAVE_RETURN_VALUE,Variable pybindgen.typehandlers.base.ForwardWrapperBase.HAVE_RETURN_VALUE=pybindgen.typehandlers.base.ForwardWrapperBase-class.html#HAVE_RETURN_VALUE"><a title="pybindgen.container.IterNextWrapper.HAVE_RETURN_VALUE
pybindgen.typehandlers.base.ForwardWrapperBase.HAVE_RETURN_VALUE" class="py-name" href="#" onclick="return doclink('link-127', 'HAVE_RETURN_VALUE', 'link-127');">HAVE_RETURN_VALUE</a></tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> <tt class="py-comment"># change to true if the wrapper</tt> </tt>
<a name="L722"></a><tt class="py-lineno"> 722</tt>  <tt class="py-line">                              <tt class="py-comment"># generates a return value even if the</tt> </tt>
<a name="L723"></a><tt class="py-lineno"> 723</tt>  <tt class="py-line">                              <tt class="py-comment"># return_value attribute is None</tt> </tt>
<a name="L724"></a><tt class="py-lineno"> 724</tt>  <tt class="py-line"> </tt>
<a name="ForwardWrapperBase.__init__"></a><div id="ForwardWrapperBase.__init__-def"><a name="L725"></a><tt class="py-lineno"> 725</tt> <a class="py-toggle" href="#" id="ForwardWrapperBase.__init__-toggle" onclick="return toggle('ForwardWrapperBase.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ForwardWrapperBase-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">return_value</tt><tt class="py-op">,</tt> <tt class="py-param">parameters</tt><tt class="py-op">,</tt> </tt>
<a name="L726"></a><tt class="py-lineno"> 726</tt>  <tt class="py-line">                 <tt class="py-param">parse_error_return</tt><tt class="py-op">,</tt> <tt class="py-param">error_return</tt><tt class="py-op">,</tt> </tt>
<a name="L727"></a><tt class="py-lineno"> 727</tt>  <tt class="py-line">                 <tt class="py-param">force_parse</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">no_c_retval</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L728"></a><tt class="py-lineno"> 728</tt>  <tt class="py-line">                 <tt class="py-param">unblock_threads</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ForwardWrapperBase.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ForwardWrapperBase.__init__-expanded"><a name="L729"></a><tt class="py-lineno"> 729</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L730"></a><tt class="py-lineno"> 730</tt>  <tt class="py-line"><tt class="py-docstring">        Base constructor</tt> </tt>
<a name="L731"></a><tt class="py-lineno"> 731</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L732"></a><tt class="py-lineno"> 732</tt>  <tt class="py-line"><tt class="py-docstring">        @param return_value: type handler for the return value</tt> </tt>
<a name="L733"></a><tt class="py-lineno"> 733</tt>  <tt class="py-line"><tt class="py-docstring">        @param parameters: a list of type handlers for the parameters</tt> </tt>
<a name="L734"></a><tt class="py-lineno"> 734</tt>  <tt class="py-line"><tt class="py-docstring">        @param parse_error_return: statement to return an error during parameter parsing</tt> </tt>
<a name="L735"></a><tt class="py-lineno"> 735</tt>  <tt class="py-line"><tt class="py-docstring">        @param error_return: statement to return an error after parameter parsing</tt> </tt>
<a name="L736"></a><tt class="py-lineno"> 736</tt>  <tt class="py-line"><tt class="py-docstring">        @param force_parse: force generation of code to parse parameters even if there are none</tt> </tt>
<a name="L737"></a><tt class="py-lineno"> 737</tt>  <tt class="py-line"><tt class="py-docstring">        @param no_c_retval: force the wrapper to not have a C return value</tt> </tt>
<a name="L738"></a><tt class="py-lineno"> 738</tt>  <tt class="py-line"><tt class="py-docstring">        @param unblock_threads: generate code to unblock python threads during the C function call</tt> </tt>
<a name="L739"></a><tt class="py-lineno"> 739</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L740"></a><tt class="py-lineno"> 740</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">return_value</tt><tt class="py-op">,</tt> <tt id="link-128" class="py-name" targets="Class pybindgen.typehandlers.base.ReturnValue=pybindgen.typehandlers.base.ReturnValue-class.html"><a title="pybindgen.typehandlers.base.ReturnValue" class="py-name" href="#" onclick="return doclink('link-128', 'ReturnValue', 'link-128');">ReturnValue</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">return_value</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> </tt>
<a name="L741"></a><tt class="py-lineno"> 741</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">parameters</tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">)</tt> </tt>
<a name="L742"></a><tt class="py-lineno"> 742</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt id="link-129" class="py-name"><a title="pybindgen.typehandlers.base.all" class="py-name" href="#" onclick="return doclink('link-129', 'all', 'link-3');">all</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-130" class="py-name"><a title="pybindgen.utils.param" class="py-name" href="#" onclick="return doclink('link-130', 'param', 'link-74');">param</a></tt><tt class="py-op">,</tt> <tt id="link-131" class="py-name"><a title="pybindgen.typehandlers.base.Parameter" class="py-name" href="#" onclick="return doclink('link-131', 'Parameter', 'link-75');">Parameter</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt id="link-132" class="py-name"><a title="pybindgen.utils.param" class="py-name" href="#" onclick="return doclink('link-132', 'param', 'link-74');">param</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">parameters</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L743"></a><tt class="py-lineno"> 743</tt>  <tt class="py-line"> </tt>
<a name="L744"></a><tt class="py-lineno"> 744</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">return_value</tt> <tt class="py-op">=</tt> <tt class="py-name">return_value</tt> </tt>
<a name="L745"></a><tt class="py-lineno"> 745</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parameters</tt> <tt class="py-op">=</tt> <tt class="py-name">parameters</tt> </tt>
<a name="L746"></a><tt class="py-lineno"> 746</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt> <tt class="py-op">=</tt> <tt id="link-133" class="py-name"><a title="pybindgen.typehandlers.base.DeclarationsScope" class="py-name" href="#" onclick="return doclink('link-133', 'DeclarationsScope', 'link-19');">DeclarationsScope</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L747"></a><tt class="py-lineno"> 747</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_parse</tt> <tt class="py-op">=</tt> <tt id="link-134" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock" class="py-name" href="#" onclick="return doclink('link-134', 'CodeBlock', 'link-20');">CodeBlock</a></tt><tt class="py-op">(</tt><tt class="py-name">parse_error_return</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt><tt class="py-op">)</tt> </tt>
<a name="L748"></a><tt class="py-lineno"> 748</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_call</tt> <tt class="py-op">=</tt> <tt id="link-135" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock" class="py-name" href="#" onclick="return doclink('link-135', 'CodeBlock', 'link-20');">CodeBlock</a></tt><tt class="py-op">(</tt><tt class="py-name">parse_error_return</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt><tt class="py-op">,</tt> </tt>
<a name="L749"></a><tt class="py-lineno"> 749</tt>  <tt class="py-line">                                     <tt class="py-name">predecessor</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_parse</tt><tt class="py-op">)</tt> </tt>
<a name="L750"></a><tt class="py-lineno"> 750</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">after_call</tt> <tt class="py-op">=</tt> <tt id="link-136" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock" class="py-name" href="#" onclick="return doclink('link-136', 'CodeBlock', 'link-20');">CodeBlock</a></tt><tt class="py-op">(</tt><tt class="py-name">error_return</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt><tt class="py-op">,</tt> </tt>
<a name="L751"></a><tt class="py-lineno"> 751</tt>  <tt class="py-line">                                    <tt class="py-name">predecessor</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_call</tt><tt class="py-op">)</tt> </tt>
<a name="L752"></a><tt class="py-lineno"> 752</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">build_params</tt> <tt class="py-op">=</tt> <tt id="link-137" class="py-name"><a title="pybindgen.typehandlers.base.BuildValueParameters" class="py-name" href="#" onclick="return doclink('link-137', 'BuildValueParameters', 'link-81');">BuildValueParameters</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L753"></a><tt class="py-lineno"> 753</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parse_params</tt> <tt class="py-op">=</tt> <tt id="link-138" class="py-name"><a title="pybindgen.typehandlers.base.ParseTupleParameters" class="py-name" href="#" onclick="return doclink('link-138', 'ParseTupleParameters', 'link-82');">ParseTupleParameters</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L754"></a><tt class="py-lineno"> 754</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">call_params</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L755"></a><tt class="py-lineno"> 755</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">force_parse</tt> <tt class="py-op">=</tt> <tt class="py-name">force_parse</tt> </tt>
<a name="L756"></a><tt class="py-lineno"> 756</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">meth_flags</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L757"></a><tt class="py-lineno"> 757</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-139" class="py-name" targets="Variable pybindgen.settings.unblock_threads=pybindgen.settings-module.html#unblock_threads"><a title="pybindgen.settings.unblock_threads" class="py-name" href="#" onclick="return doclink('link-139', 'unblock_threads', 'link-139');">unblock_threads</a></tt> <tt class="py-op">=</tt> <tt id="link-140" class="py-name"><a title="pybindgen.settings.unblock_threads" class="py-name" href="#" onclick="return doclink('link-140', 'unblock_threads', 'link-139');">unblock_threads</a></tt> </tt>
<a name="L758"></a><tt class="py-lineno"> 758</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">no_c_retval</tt> <tt class="py-op">=</tt> <tt class="py-name">no_c_retval</tt> </tt>
<a name="L759"></a><tt class="py-lineno"> 759</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">overload_index</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L760"></a><tt class="py-lineno"> 760</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">deprecated</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L761"></a><tt class="py-lineno"> 761</tt>  <tt class="py-line"> </tt>
<a name="L762"></a><tt class="py-lineno"> 762</tt>  <tt class="py-line">        <tt class="py-comment"># The following 3 variables describe the C wrapper function</tt> </tt>
<a name="L763"></a><tt class="py-lineno"> 763</tt>  <tt class="py-line">        <tt class="py-comment"># prototype; do not confuse with the python function/method!</tt> </tt>
<a name="L764"></a><tt class="py-lineno"> 764</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">wrapper_actual_name</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> <tt class="py-comment"># name of the wrapper function/method</tt> </tt>
<a name="L765"></a><tt class="py-lineno"> 765</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">wrapper_return</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> <tt class="py-comment"># C type expression for the wrapper return</tt> </tt>
<a name="L766"></a><tt class="py-lineno"> 766</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">wrapper_args</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> <tt class="py-comment"># list of arguments to the wrapper function</tt> </tt>
<a name="L767"></a><tt class="py-lineno"> 767</tt>  <tt class="py-line">         </tt>
<a name="L768"></a><tt class="py-lineno"> 768</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">return_value</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L769"></a><tt class="py-lineno"> 769</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt><tt class="py-op">.</tt><tt id="link-141" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.declare_variable
pybindgen.typehandlers.base.DeclarationsScope.declare_variable" class="py-name" href="#" onclick="return doclink('link-141', 'declare_variable', 'link-27');">declare_variable</a></tt><tt class="py-op">(</tt><tt class="py-string">'PyObject*'</tt><tt class="py-op">,</tt> <tt class="py-string">'py_retval'</tt><tt class="py-op">)</tt> </tt>
<a name="L770"></a><tt class="py-lineno"> 770</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-keyword">not</tt> <tt class="py-name">no_c_retval</tt> <tt class="py-keyword">and</tt> <tt class="py-name">return_value</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt> </tt>
<a name="L771"></a><tt class="py-lineno"> 771</tt>  <tt class="py-line">            <tt class="py-keyword">and</tt> <tt class="py-name">return_value</tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt> <tt class="py-op">!=</tt> <tt class="py-string">'void'</tt> </tt>
<a name="L772"></a><tt class="py-lineno"> 772</tt>  <tt class="py-line">            <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">return_value</tt><tt class="py-op">.</tt><tt id="link-142" class="py-name"><a title="pybindgen.cppclass_typehandlers.CppClassReturnValue.REQUIRES_ASSIGNMENT_CONSTRUCTOR
pybindgen.typehandlers.base.ReturnValue.REQUIRES_ASSIGNMENT_CONSTRUCTOR" class="py-name" href="#" onclick="return doclink('link-142', 'REQUIRES_ASSIGNMENT_CONSTRUCTOR', 'link-94');">REQUIRES_ASSIGNMENT_CONSTRUCTOR</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L773"></a><tt class="py-lineno"> 773</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt><tt class="py-op">.</tt><tt id="link-143" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.declare_variable
pybindgen.typehandlers.base.DeclarationsScope.declare_variable" class="py-name" href="#" onclick="return doclink('link-143', 'declare_variable', 'link-27');">declare_variable</a></tt><tt class="py-op">(</tt><tt class="py-name">return_value</tt><tt class="py-op">.</tt><tt id="link-144" class="py-name" targets="Variable pybindgen.typehandlers.base.TypeHandler.ctype_no_const=pybindgen.typehandlers.base.TypeHandler-class.html#ctype_no_const"><a title="pybindgen.typehandlers.base.TypeHandler.ctype_no_const" class="py-name" href="#" onclick="return doclink('link-144', 'ctype_no_const', 'link-144');">ctype_no_const</a></tt><tt class="py-op">,</tt> <tt class="py-string">'retval'</tt><tt class="py-op">)</tt> </tt>
</div><a name="L774"></a><tt class="py-lineno"> 774</tt>  <tt class="py-line"> </tt>
<a name="ForwardWrapperBase.reset_code_generation_state"></a><div id="ForwardWrapperBase.reset_code_generation_state-def"><a name="L775"></a><tt class="py-lineno"> 775</tt> <a class="py-toggle" href="#" id="ForwardWrapperBase.reset_code_generation_state-toggle" onclick="return toggle('ForwardWrapperBase.reset_code_generation_state');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ForwardWrapperBase-class.html#reset_code_generation_state">reset_code_generation_state</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ForwardWrapperBase.reset_code_generation_state-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ForwardWrapperBase.reset_code_generation_state-expanded"><a name="L776"></a><tt class="py-lineno"> 776</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt><tt class="py-op">.</tt><tt id="link-145" class="py-name"><a title="pybindgen.typehandlers.base.BuildValueParameters.clear
pybindgen.typehandlers.base.CodeBlock.clear
pybindgen.typehandlers.base.DeclarationsScope.clear
pybindgen.typehandlers.base.ParseTupleParameters.clear" class="py-name" href="#" onclick="return doclink('link-145', 'clear', 'link-60');">clear</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L777"></a><tt class="py-lineno"> 777</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_parse</tt><tt class="py-op">.</tt><tt id="link-146" class="py-name"><a title="pybindgen.typehandlers.base.BuildValueParameters.clear
pybindgen.typehandlers.base.CodeBlock.clear
pybindgen.typehandlers.base.DeclarationsScope.clear
pybindgen.typehandlers.base.ParseTupleParameters.clear" class="py-name" href="#" onclick="return doclink('link-146', 'clear', 'link-60');">clear</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L778"></a><tt class="py-lineno"> 778</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_call</tt><tt class="py-op">.</tt><tt id="link-147" class="py-name"><a title="pybindgen.typehandlers.base.BuildValueParameters.clear
pybindgen.typehandlers.base.CodeBlock.clear
pybindgen.typehandlers.base.DeclarationsScope.clear
pybindgen.typehandlers.base.ParseTupleParameters.clear" class="py-name" href="#" onclick="return doclink('link-147', 'clear', 'link-60');">clear</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L779"></a><tt class="py-lineno"> 779</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">after_call</tt><tt class="py-op">.</tt><tt id="link-148" class="py-name"><a title="pybindgen.typehandlers.base.BuildValueParameters.clear
pybindgen.typehandlers.base.CodeBlock.clear
pybindgen.typehandlers.base.DeclarationsScope.clear
pybindgen.typehandlers.base.ParseTupleParameters.clear" class="py-name" href="#" onclick="return doclink('link-148', 'clear', 'link-60');">clear</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L780"></a><tt class="py-lineno"> 780</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">build_params</tt><tt class="py-op">.</tt><tt id="link-149" class="py-name"><a title="pybindgen.typehandlers.base.BuildValueParameters.clear
pybindgen.typehandlers.base.CodeBlock.clear
pybindgen.typehandlers.base.DeclarationsScope.clear
pybindgen.typehandlers.base.ParseTupleParameters.clear" class="py-name" href="#" onclick="return doclink('link-149', 'clear', 'link-60');">clear</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L781"></a><tt class="py-lineno"> 781</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parse_params</tt><tt class="py-op">.</tt><tt id="link-150" class="py-name"><a title="pybindgen.typehandlers.base.BuildValueParameters.clear
pybindgen.typehandlers.base.CodeBlock.clear
pybindgen.typehandlers.base.DeclarationsScope.clear
pybindgen.typehandlers.base.ParseTupleParameters.clear" class="py-name" href="#" onclick="return doclink('link-150', 'clear', 'link-60');">clear</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L782"></a><tt class="py-lineno"> 782</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">call_params</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L783"></a><tt class="py-lineno"> 783</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">meth_flags</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L784"></a><tt class="py-lineno"> 784</tt>  <tt class="py-line"> </tt>
<a name="L785"></a><tt class="py-lineno"> 785</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">return_value</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-151" class="py-name"><a title="pybindgen.container.IterNextWrapper.HAVE_RETURN_VALUE
pybindgen.typehandlers.base.ForwardWrapperBase.HAVE_RETURN_VALUE" class="py-name" href="#" onclick="return doclink('link-151', 'HAVE_RETURN_VALUE', 'link-127');">HAVE_RETURN_VALUE</a></tt><tt class="py-op">:</tt> </tt>
<a name="L786"></a><tt class="py-lineno"> 786</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt><tt class="py-op">.</tt><tt id="link-152" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.declare_variable
pybindgen.typehandlers.base.DeclarationsScope.declare_variable" class="py-name" href="#" onclick="return doclink('link-152', 'declare_variable', 'link-27');">declare_variable</a></tt><tt class="py-op">(</tt><tt class="py-string">'PyObject*'</tt><tt class="py-op">,</tt> <tt class="py-string">'py_retval'</tt><tt class="py-op">)</tt> </tt>
<a name="L787"></a><tt class="py-lineno"> 787</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">no_c_retval</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">return_value</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-153" class="py-name"><a title="pybindgen.container.IterNextWrapper.HAVE_RETURN_VALUE
pybindgen.typehandlers.base.ForwardWrapperBase.HAVE_RETURN_VALUE" class="py-name" href="#" onclick="return doclink('link-153', 'HAVE_RETURN_VALUE', 'link-127');">HAVE_RETURN_VALUE</a></tt><tt class="py-op">)</tt> </tt>
<a name="L788"></a><tt class="py-lineno"> 788</tt>  <tt class="py-line">            <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">return_value</tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt> <tt class="py-op">!=</tt> <tt class="py-string">'void'</tt> </tt>
<a name="L789"></a><tt class="py-lineno"> 789</tt>  <tt class="py-line">            <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">return_value</tt><tt class="py-op">.</tt><tt id="link-154" class="py-name"><a title="pybindgen.cppclass_typehandlers.CppClassReturnValue.REQUIRES_ASSIGNMENT_CONSTRUCTOR
pybindgen.typehandlers.base.ReturnValue.REQUIRES_ASSIGNMENT_CONSTRUCTOR" class="py-name" href="#" onclick="return doclink('link-154', 'REQUIRES_ASSIGNMENT_CONSTRUCTOR', 'link-94');">REQUIRES_ASSIGNMENT_CONSTRUCTOR</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L790"></a><tt class="py-lineno"> 790</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt><tt class="py-op">.</tt><tt id="link-155" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.declare_variable
pybindgen.typehandlers.base.DeclarationsScope.declare_variable" class="py-name" href="#" onclick="return doclink('link-155', 'declare_variable', 'link-27');">declare_variable</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">return_value</tt><tt class="py-op">.</tt><tt id="link-156" class="py-name"><a title="pybindgen.typehandlers.base.TypeHandler.ctype_no_const" class="py-name" href="#" onclick="return doclink('link-156', 'ctype_no_const', 'link-144');">ctype_no_const</a></tt><tt class="py-op">,</tt> <tt class="py-string">'retval'</tt><tt class="py-op">)</tt> </tt>
</div><a name="L791"></a><tt class="py-lineno"> 791</tt>  <tt class="py-line"> </tt>
<a name="ForwardWrapperBase.set_parse_error_return"></a><div id="ForwardWrapperBase.set_parse_error_return-def"><a name="L792"></a><tt class="py-lineno"> 792</tt> <a class="py-toggle" href="#" id="ForwardWrapperBase.set_parse_error_return-toggle" onclick="return toggle('ForwardWrapperBase.set_parse_error_return');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ForwardWrapperBase-class.html#set_parse_error_return">set_parse_error_return</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">parse_error_return</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ForwardWrapperBase.set_parse_error_return-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ForwardWrapperBase.set_parse_error_return-expanded"><a name="L793"></a><tt class="py-lineno"> 793</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_parse</tt><tt class="py-op">.</tt><tt class="py-name">error_return</tt> <tt class="py-op">=</tt> <tt class="py-name">parse_error_return</tt> </tt>
<a name="L794"></a><tt class="py-lineno"> 794</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_call</tt><tt class="py-op">.</tt><tt class="py-name">error_return</tt> <tt class="py-op">=</tt> <tt class="py-name">parse_error_return</tt> </tt>
</div><a name="L795"></a><tt class="py-lineno"> 795</tt>  <tt class="py-line"> </tt>
<a name="ForwardWrapperBase.generate_call"></a><div id="ForwardWrapperBase.generate_call-def"><a name="L796"></a><tt class="py-lineno"> 796</tt> <a class="py-toggle" href="#" id="ForwardWrapperBase.generate_call-toggle" onclick="return toggle('ForwardWrapperBase.generate_call');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ForwardWrapperBase-class.html#generate_call">generate_call</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ForwardWrapperBase.generate_call-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ForwardWrapperBase.generate_call-expanded"><a name="L797"></a><tt class="py-lineno"> 797</tt>  <tt class="py-line">        <tt class="py-docstring">"""Generates the code (into self.before_call) to call into</tt> </tt>
<a name="L798"></a><tt class="py-lineno"> 798</tt>  <tt class="py-line"><tt class="py-docstring">        Python, storing the result in the variable 'py_retval'; should</tt> </tt>
<a name="L799"></a><tt class="py-lineno"> 799</tt>  <tt class="py-line"><tt class="py-docstring">        also check for call error.</tt> </tt>
<a name="L800"></a><tt class="py-lineno"> 800</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L801"></a><tt class="py-lineno"> 801</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt> </tt>
</div><a name="L802"></a><tt class="py-lineno"> 802</tt>  <tt class="py-line"> </tt>
<a name="ForwardWrapperBase._before_return_hook"></a><div id="ForwardWrapperBase._before_return_hook-def"><a name="L803"></a><tt class="py-lineno"> 803</tt> <a class="py-toggle" href="#" id="ForwardWrapperBase._before_return_hook-toggle" onclick="return toggle('ForwardWrapperBase._before_return_hook');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ForwardWrapperBase-class.html#_before_return_hook">_before_return_hook</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ForwardWrapperBase._before_return_hook-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ForwardWrapperBase._before_return_hook-expanded"><a name="L804"></a><tt class="py-lineno"> 804</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L805"></a><tt class="py-lineno"> 805</tt>  <tt class="py-line"><tt class="py-docstring">        Optional hook that lets subclasses add code after all</tt> </tt>
<a name="L806"></a><tt class="py-lineno"> 806</tt>  <tt class="py-line"><tt class="py-docstring">        parameters are parsed and after the function C return value is</tt> </tt>
<a name="L807"></a><tt class="py-lineno"> 807</tt>  <tt class="py-line"><tt class="py-docstring">        processed, but after the python wrapper return value (py_ret)</tt> </tt>
<a name="L808"></a><tt class="py-lineno"> 808</tt>  <tt class="py-line"><tt class="py-docstring">        is built and returned.  Subclasses may add code to</tt> </tt>
<a name="L809"></a><tt class="py-lineno"> 809</tt>  <tt class="py-line"><tt class="py-docstring">        self.after_call, which will be placed before py_ret is</tt> </tt>
<a name="L810"></a><tt class="py-lineno"> 810</tt>  <tt class="py-line"><tt class="py-docstring">        created.</tt> </tt>
<a name="L811"></a><tt class="py-lineno"> 811</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L812"></a><tt class="py-lineno"> 812</tt>  <tt class="py-line">        <tt class="py-keyword">pass</tt> </tt>
</div><a name="L813"></a><tt class="py-lineno"> 813</tt>  <tt class="py-line"> </tt>
<a name="ForwardWrapperBase.write_open_wrapper"></a><div id="ForwardWrapperBase.write_open_wrapper-def"><a name="L814"></a><tt class="py-lineno"> 814</tt> <a class="py-toggle" href="#" id="ForwardWrapperBase.write_open_wrapper-toggle" onclick="return toggle('ForwardWrapperBase.write_open_wrapper');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ForwardWrapperBase-class.html#write_open_wrapper">write_open_wrapper</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">,</tt> <tt class="py-param">add_static</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ForwardWrapperBase.write_open_wrapper-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ForwardWrapperBase.write_open_wrapper-expanded"><a name="L815"></a><tt class="py-lineno"> 815</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">wrapper_actual_name</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt> </tt>
<a name="L816"></a><tt class="py-lineno"> 816</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">wrapper_return</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt> </tt>
<a name="L817"></a><tt class="py-lineno"> 817</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">wrapper_args</tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">)</tt> </tt>
<a name="L818"></a><tt class="py-lineno"> 818</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">add_static</tt><tt class="py-op">:</tt> </tt>
<a name="L819"></a><tt class="py-lineno"> 819</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-157" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-157', 'writeln', 'link-29');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"static "</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">wrapper_return</tt><tt class="py-op">)</tt> </tt>
<a name="L820"></a><tt class="py-lineno"> 820</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L821"></a><tt class="py-lineno"> 821</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-158" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-158', 'writeln', 'link-29');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">wrapper_return</tt><tt class="py-op">)</tt> </tt>
<a name="L822"></a><tt class="py-lineno"> 822</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-159" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-159', 'writeln', 'link-29');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s(%s)"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">wrapper_actual_name</tt><tt class="py-op">,</tt> <tt class="py-string">', '</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">wrapper_args</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L823"></a><tt class="py-lineno"> 823</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-160" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-160', 'writeln', 'link-29');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">'{'</tt><tt class="py-op">)</tt> </tt>
<a name="L824"></a><tt class="py-lineno"> 824</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-161" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.indent
pybindgen.typehandlers.codesink.CodeSink.indent" class="py-name" href="#" onclick="return doclink('link-161', 'indent', 'link-30');">indent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L825"></a><tt class="py-lineno"> 825</tt>  <tt class="py-line"> </tt>
<a name="ForwardWrapperBase.write_close_wrapper"></a><div id="ForwardWrapperBase.write_close_wrapper-def"><a name="L826"></a><tt class="py-lineno"> 826</tt> <a class="py-toggle" href="#" id="ForwardWrapperBase.write_close_wrapper-toggle" onclick="return toggle('ForwardWrapperBase.write_close_wrapper');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ForwardWrapperBase-class.html#write_close_wrapper">write_close_wrapper</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ForwardWrapperBase.write_close_wrapper-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ForwardWrapperBase.write_close_wrapper-expanded"><a name="L827"></a><tt class="py-lineno"> 827</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-162" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.unindent
pybindgen.typehandlers.codesink.CodeSink.unindent" class="py-name" href="#" onclick="return doclink('link-162', 'unindent', 'link-31');">unindent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L828"></a><tt class="py-lineno"> 828</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-163" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-163', 'writeln', 'link-29');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">'}'</tt><tt class="py-op">)</tt> </tt>
</div><a name="L829"></a><tt class="py-lineno"> 829</tt>  <tt class="py-line"> </tt>
<a name="L830"></a><tt class="py-lineno"> 830</tt>  <tt class="py-line"> </tt>
<a name="ForwardWrapperBase.generate_body"></a><div id="ForwardWrapperBase.generate_body-def"><a name="L831"></a><tt class="py-lineno"> 831</tt> <a class="py-toggle" href="#" id="ForwardWrapperBase.generate_body-toggle" onclick="return toggle('ForwardWrapperBase.generate_body');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ForwardWrapperBase-class.html#generate_body">generate_body</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">,</tt> <tt class="py-param">gen_call_params</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ForwardWrapperBase.generate_body-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ForwardWrapperBase.generate_body-expanded"><a name="L832"></a><tt class="py-lineno"> 832</tt>  <tt class="py-line">        <tt class="py-docstring">"""Generate the wrapper function body</tt> </tt>
<a name="L833"></a><tt class="py-lineno"> 833</tt>  <tt class="py-line"><tt class="py-docstring">        code_sink -- a CodeSink object that will receive the code</tt> </tt>
<a name="L834"></a><tt class="py-lineno"> 834</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L835"></a><tt class="py-lineno"> 835</tt>  <tt class="py-line"> </tt>
<a name="L836"></a><tt class="py-lineno"> 836</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-164" class="py-name"><a title="pybindgen.settings.unblock_threads" class="py-name" href="#" onclick="return doclink('link-164', 'unblock_threads', 'link-139');">unblock_threads</a></tt><tt class="py-op">:</tt> </tt>
<a name="L837"></a><tt class="py-lineno"> 837</tt>  <tt class="py-line">            <tt class="py-name">py_thread_state</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt><tt class="py-op">.</tt><tt id="link-165" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.declare_variable
pybindgen.typehandlers.base.DeclarationsScope.declare_variable" class="py-name" href="#" onclick="return doclink('link-165', 'declare_variable', 'link-27');">declare_variable</a></tt><tt class="py-op">(</tt><tt class="py-string">"PyThreadState*"</tt><tt class="py-op">,</tt> <tt class="py-string">"py_thread_state"</tt><tt class="py-op">,</tt> <tt class="py-string">"NULL"</tt><tt class="py-op">)</tt> </tt>
<a name="L838"></a><tt class="py-lineno"> 838</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">after_call</tt><tt class="py-op">.</tt><tt id="link-166" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-166', 'write_code', 'link-90');">write_code</a></tt><tt class="py-op">(</tt> </tt>
<a name="L839"></a><tt class="py-lineno"> 839</tt>  <tt class="py-line">                <tt class="py-string">"\nif (%s)\n"</tt> </tt>
<a name="L840"></a><tt class="py-lineno"> 840</tt>  <tt class="py-line">                <tt class="py-string">"     PyEval_RestoreThread(%s);\n"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">py_thread_state</tt><tt class="py-op">,</tt> <tt class="py-name">py_thread_state</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L841"></a><tt class="py-lineno"> 841</tt>  <tt class="py-line"> </tt>
<a name="L842"></a><tt class="py-lineno"> 842</tt>  <tt class="py-line">        <tt class="py-comment">## convert the input parameters</tt> </tt>
<a name="L843"></a><tt class="py-lineno"> 843</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-167" class="py-name"><a title="pybindgen.utils.param" class="py-name" href="#" onclick="return doclink('link-167', 'param', 'link-74');">param</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parameters</tt><tt class="py-op">:</tt> </tt>
<a name="L844"></a><tt class="py-lineno"> 844</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L845"></a><tt class="py-lineno"> 845</tt>  <tt class="py-line">                <tt id="link-168" class="py-name"><a title="pybindgen.utils.param" class="py-name" href="#" onclick="return doclink('link-168', 'param', 'link-74');">param</a></tt><tt class="py-op">.</tt><tt id="link-169" class="py-name"><a title="pybindgen.container.ContainerParameter.convert_python_to_c
pybindgen.container.ContainerPtrParameter.convert_python_to_c
pybindgen.container.ContainerRefParameter.convert_python_to_c
pybindgen.container.ContainerReturnValue.convert_python_to_c
pybindgen.cppclass_typehandlers.CppClassParameter.convert_python_to_c
pybindgen.cppclass_typehandlers.CppClassPtrParameter.convert_python_to_c
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.convert_python_to_c
pybindgen.cppclass_typehandlers.CppClassRefParameter.convert_python_to_c
pybindgen.cppclass_typehandlers.CppClassReturnValue.convert_python_to_c
pybindgen.cppmethod.DummyParameter.convert_python_to_c
pybindgen.cppmethod.DummyReturnValue.convert_python_to_c
pybindgen.typehandlers.base.Parameter.convert_python_to_c
pybindgen.typehandlers.base.ReturnValue.convert_python_to_c
pybindgen.typehandlers.booltype.BoolParam.convert_python_to_c
pybindgen.typehandlers.booltype.BoolPtrParam.convert_python_to_c
pybindgen.typehandlers.booltype.BoolRefParam.convert_python_to_c
pybindgen.typehandlers.booltype.BoolReturn.convert_python_to_c
pybindgen.typehandlers.doubletype.DoubleParam.convert_python_to_c
pybindgen.typehandlers.doubletype.DoublePtrParam.convert_python_to_c
pybindgen.typehandlers.doubletype.DoubleRefParam.convert_python_to_c
pybindgen.typehandlers.doubletype.DoubleReturn.convert_python_to_c
pybindgen.typehandlers.floattype.FloatParam.convert_python_to_c
pybindgen.typehandlers.floattype.FloatPtrParam.convert_python_to_c
pybindgen.typehandlers.floattype.FloatRefParam.convert_python_to_c
pybindgen.typehandlers.floattype.FloatReturn.convert_python_to_c
pybindgen.typehandlers.inttype.Int16Param.convert_python_to_c
pybindgen.typehandlers.inttype.Int16Return.convert_python_to_c
pybindgen.typehandlers.inttype.Int8PtrParam.convert_python_to_c
pybindgen.typehandlers.inttype.IntParam.convert_python_to_c
pybindgen.typehandlers.inttype.IntPtrParam.convert_python_to_c
pybindgen.typehandlers.inttype.IntRefParam.convert_python_to_c
pybindgen.typehandlers.inttype.IntReturn.convert_python_to_c
pybindgen.typehandlers.inttype.LongLongParam.convert_python_to_c
pybindgen.typehandlers.inttype.LongLongReturn.convert_python_to_c
pybindgen.typehandlers.inttype.SizeTParam.convert_python_to_c
pybindgen.typehandlers.inttype.SizeTReturn.convert_python_to_c
pybindgen.typehandlers.inttype.UInt16Param.convert_python_to_c
pybindgen.typehandlers.inttype.UInt16Return.convert_python_to_c
pybindgen.typehandlers.inttype.UInt8Param.convert_python_to_c
pybindgen.typehandlers.inttype.UInt8PtrParam.convert_python_to_c
pybindgen.typehandlers.inttype.UInt8Return.convert_python_to_c
pybindgen.typehandlers.inttype.UnsignedIntParam.convert_python_to_c
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.convert_python_to_c
pybindgen.typehandlers.inttype.UnsignedIntReturn.convert_python_to_c
pybindgen.typehandlers.inttype.UnsignedLongLongParam.convert_python_to_c
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.convert_python_to_c
pybindgen.typehandlers.pyobjecttype.PyObjectParam.convert_python_to_c
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.convert_python_to_c
pybindgen.typehandlers.stringtype.CStringParam.convert_python_to_c
pybindgen.typehandlers.stringtype.CStringReturn.convert_python_to_c
pybindgen.typehandlers.stringtype.CharParam.convert_python_to_c
pybindgen.typehandlers.stringtype.CharReturn.convert_python_to_c
pybindgen.typehandlers.stringtype.StdStringParam.convert_python_to_c
pybindgen.typehandlers.stringtype.StdStringRefParam.convert_python_to_c
pybindgen.typehandlers.stringtype.StdStringReturn.convert_python_to_c
pybindgen.typehandlers.voidtype.VoidReturn.convert_python_to_c" class="py-name" href="#" onclick="return doclink('link-169', 'convert_python_to_c', 'link-100');">convert_python_to_c</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L846"></a><tt class="py-lineno"> 846</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">NotImplementedError</tt><tt class="py-op">:</tt> </tt>
<a name="L847"></a><tt class="py-lineno"> 847</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt id="link-170" class="py-name" targets="Class pybindgen.typehandlers.base.CodeGenerationError=pybindgen.typehandlers.base.CodeGenerationError-class.html"><a title="pybindgen.typehandlers.base.CodeGenerationError" class="py-name" href="#" onclick="return doclink('link-170', 'CodeGenerationError', 'link-170');">CodeGenerationError</a></tt><tt class="py-op">(</tt> </tt>
<a name="L848"></a><tt class="py-lineno"> 848</tt>  <tt class="py-line">                    <tt class="py-string">'convert_python_to_c method of parameter %s not implemented'</tt> </tt>
<a name="L849"></a><tt class="py-lineno"> 849</tt>  <tt class="py-line">                    <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-171" class="py-name"><a title="pybindgen.utils.param" class="py-name" href="#" onclick="return doclink('link-171', 'param', 'link-74');">param</a></tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L850"></a><tt class="py-lineno"> 850</tt>  <tt class="py-line"> </tt>
<a name="L851"></a><tt class="py-lineno"> 851</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">deprecated</tt><tt class="py-op">:</tt> </tt>
<a name="L852"></a><tt class="py-lineno"> 852</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">deprecated</tt><tt class="py-op">,</tt> <tt class="py-name">basestring</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L853"></a><tt class="py-lineno"> 853</tt>  <tt class="py-line">                <tt class="py-name">msg</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">deprecated</tt> </tt>
<a name="L854"></a><tt class="py-lineno"> 854</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L855"></a><tt class="py-lineno"> 855</tt>  <tt class="py-line">                <tt class="py-name">msg</tt> <tt class="py-op">=</tt> <tt class="py-string">"Deprecated"</tt> </tt>
<a name="L856"></a><tt class="py-lineno"> 856</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_call</tt><tt class="py-op">.</tt><tt id="link-172" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_error_check" class="py-name" href="#" onclick="return doclink('link-172', 'write_error_check', 'link-102');">write_error_check</a></tt><tt class="py-op">(</tt> <tt class="py-string">'PyErr_Warn(PyExc_DeprecationWarning, (char *) "%s")'</tt> <tt class="py-op">%</tt> <tt class="py-name">msg</tt><tt class="py-op">)</tt> </tt>
<a name="L857"></a><tt class="py-lineno"> 857</tt>  <tt class="py-line"> </tt>
<a name="L858"></a><tt class="py-lineno"> 858</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-173" class="py-name"><a title="pybindgen.settings.unblock_threads" class="py-name" href="#" onclick="return doclink('link-173', 'unblock_threads', 'link-139');">unblock_threads</a></tt><tt class="py-op">:</tt> </tt>
<a name="L859"></a><tt class="py-lineno"> 859</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_call</tt><tt class="py-op">.</tt><tt id="link-174" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-174', 'write_code', 'link-90');">write_code</a></tt><tt class="py-op">(</tt> </tt>
<a name="L860"></a><tt class="py-lineno"> 860</tt>  <tt class="py-line">                <tt class="py-string">"\nif (PyEval_ThreadsInitialized ())\n"</tt> </tt>
<a name="L861"></a><tt class="py-lineno"> 861</tt>  <tt class="py-line">                <tt class="py-string">"     %s = PyEval_SaveThread();\n"</tt> </tt>
<a name="L862"></a><tt class="py-lineno"> 862</tt>  <tt class="py-line">                <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">py_thread_state</tt><tt class="py-op">,</tt> <tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L863"></a><tt class="py-lineno"> 863</tt>  <tt class="py-line"> </tt>
<a name="L864"></a><tt class="py-lineno"> 864</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-175" class="py-name" targets="Method pybindgen.container.IterNextWrapper.generate_call()=pybindgen.container.IterNextWrapper-class.html#generate_call,Method pybindgen.cppattribute.CppInstanceAttributeGetter.generate_call()=pybindgen.cppattribute.CppInstanceAttributeGetter-class.html#generate_call,Method pybindgen.cppattribute.CppStaticAttributeGetter.generate_call()=pybindgen.cppattribute.CppStaticAttributeGetter-class.html#generate_call,Method pybindgen.cppattribute.PyGetter.generate_call()=pybindgen.cppattribute.PyGetter-class.html#generate_call,Method pybindgen.cppmethod.CppConstructor.generate_call()=pybindgen.cppmethod.CppConstructor-class.html#generate_call,Method pybindgen.cppmethod.CppFunctionAsConstructor.generate_call()=pybindgen.cppmethod.CppFunctionAsConstructor-class.html#generate_call,Method pybindgen.cppmethod.CppMethod.generate_call()=pybindgen.cppmethod.CppMethod-class.html#generate_call,Method pybindgen.cppmethod.CppNoConstructor.generate_call()=pybindgen.cppmethod.CppNoConstructor-class.html#generate_call,Method pybindgen.cppmethod.CppVirtualMethodParentCaller.generate_call()=pybindgen.cppmethod.CppVirtualMethodParentCaller-class.html#generate_call,Method pybindgen.cppmethod.CustomCppConstructorWrapper.generate_call()=pybindgen.cppmethod.CustomCppConstructorWrapper-class.html#generate_call,Method pybindgen.cppmethod.CustomCppMethodWrapper.generate_call()=pybindgen.cppmethod.CustomCppMethodWrapper-class.html#generate_call,Method pybindgen.function.CustomFunctionWrapper.generate_call()=pybindgen.function.CustomFunctionWrapper-class.html#generate_call,Method pybindgen.function.Function.generate_call()=pybindgen.function.Function-class.html#generate_call,Method pybindgen.typehandlers.base.ForwardWrapperBase.generate_call()=pybindgen.typehandlers.base.ForwardWrapperBase-class.html#generate_call"><a title="pybindgen.container.IterNextWrapper.generate_call
pybindgen.cppattribute.CppInstanceAttributeGetter.generate_call
pybindgen.cppattribute.CppStaticAttributeGetter.generate_call
pybindgen.cppattribute.PyGetter.generate_call
pybindgen.cppmethod.CppConstructor.generate_call
pybindgen.cppmethod.CppFunctionAsConstructor.generate_call
pybindgen.cppmethod.CppMethod.generate_call
pybindgen.cppmethod.CppNoConstructor.generate_call
pybindgen.cppmethod.CppVirtualMethodParentCaller.generate_call
pybindgen.cppmethod.CustomCppConstructorWrapper.generate_call
pybindgen.cppmethod.CustomCppMethodWrapper.generate_call
pybindgen.function.CustomFunctionWrapper.generate_call
pybindgen.function.Function.generate_call
pybindgen.typehandlers.base.ForwardWrapperBase.generate_call" class="py-name" href="#" onclick="return doclink('link-175', 'generate_call', 'link-175');">generate_call</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">gen_call_params</tt><tt class="py-op">)</tt> </tt>
<a name="L865"></a><tt class="py-lineno"> 865</tt>  <tt class="py-line"> </tt>
<a name="L866"></a><tt class="py-lineno"> 866</tt>  <tt class="py-line">        <tt class="py-name">params</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parse_params</tt><tt class="py-op">.</tt><tt id="link-176" class="py-name"><a title="pybindgen.typehandlers.base.BuildValueParameters.get_parameters
pybindgen.typehandlers.base.ParseTupleParameters.get_parameters" class="py-name" href="#" onclick="return doclink('link-176', 'get_parameters', 'link-51');">get_parameters</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L867"></a><tt class="py-lineno"> 867</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">params</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'"'</tt> </tt>
<a name="L868"></a><tt class="py-lineno"> 868</tt>  <tt class="py-line">        <tt class="py-name">params_empty</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">params</tt> <tt class="py-op">==</tt> <tt class="py-op">[</tt><tt class="py-string">'""'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L869"></a><tt class="py-lineno"> 869</tt>  <tt class="py-line">        <tt class="py-name">params</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'(char *) '</tt> <tt class="py-op">+</tt> <tt class="py-name">params</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L870"></a><tt class="py-lineno"> 870</tt>  <tt class="py-line">        <tt class="py-name">keywords</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parse_params</tt><tt class="py-op">.</tt><tt id="link-177" class="py-name" targets="Method pybindgen.typehandlers.base.ParseTupleParameters.get_keywords()=pybindgen.typehandlers.base.ParseTupleParameters-class.html#get_keywords"><a title="pybindgen.typehandlers.base.ParseTupleParameters.get_keywords" class="py-name" href="#" onclick="return doclink('link-177', 'get_keywords', 'link-177');">get_keywords</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L871"></a><tt class="py-lineno"> 871</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">params_empty</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">force_parse</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L872"></a><tt class="py-lineno"> 872</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">meth_flags</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">"METH_VARARGS"</tt><tt class="py-op">)</tt> </tt>
<a name="L873"></a><tt class="py-lineno"> 873</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">keywords</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> \ </tt>
<a name="L874"></a><tt class="py-lineno"> 874</tt>  <tt class="py-line">                    <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">force_parse</tt> <tt class="py-op">!=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-178" class="py-name"><a title="pybindgen.typehandlers.base.ForwardWrapperBase.PARSE_TUPLE_AND_KEYWORDS" class="py-name" href="#" onclick="return doclink('link-178', 'PARSE_TUPLE_AND_KEYWORDS', 'link-126');">PARSE_TUPLE_AND_KEYWORDS</a></tt><tt class="py-op">:</tt> </tt>
<a name="L875"></a><tt class="py-lineno"> 875</tt>  <tt class="py-line"> </tt>
<a name="L876"></a><tt class="py-lineno"> 876</tt>  <tt class="py-line">                <tt class="py-name">param_list</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'args'</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-name">params</tt> </tt>
<a name="L877"></a><tt class="py-lineno"> 877</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_parse</tt><tt class="py-op">.</tt><tt id="link-179" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_error_check" class="py-name" href="#" onclick="return doclink('link-179', 'write_error_check', 'link-102');">write_error_check</a></tt><tt class="py-op">(</tt><tt class="py-string">'!PyArg_ParseTuple(%s)'</tt> <tt class="py-op">%</tt> </tt>
<a name="L878"></a><tt class="py-lineno"> 878</tt>  <tt class="py-line">                                                    <tt class="py-op">(</tt><tt class="py-string">', '</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">param_list</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L879"></a><tt class="py-lineno"> 879</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L880"></a><tt class="py-lineno"> 880</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">keywords</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L881"></a><tt class="py-lineno"> 881</tt>  <tt class="py-line">                    <tt class="py-name">keywords</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L882"></a><tt class="py-lineno"> 882</tt>  <tt class="py-line">                <tt class="py-name">keywords_var</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt><tt class="py-op">.</tt><tt id="link-180" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.declare_variable
pybindgen.typehandlers.base.DeclarationsScope.declare_variable" class="py-name" href="#" onclick="return doclink('link-180', 'declare_variable', 'link-27');">declare_variable</a></tt><tt class="py-op">(</tt> </tt>
<a name="L883"></a><tt class="py-lineno"> 883</tt>  <tt class="py-line">                    <tt class="py-string">'const char *'</tt><tt class="py-op">,</tt> <tt class="py-string">'keywords'</tt><tt class="py-op">,</tt> </tt>
<a name="L884"></a><tt class="py-lineno"> 884</tt>  <tt class="py-line">                    <tt class="py-string">'{'</tt> <tt class="py-op">+</tt> <tt class="py-string">', '</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'"%s"'</tt> <tt class="py-op">%</tt> <tt class="py-name">kw</tt> <tt class="py-keyword">for</tt> <tt class="py-name">kw</tt> <tt class="py-keyword">in</tt> <tt class="py-name">keywords</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-op">[</tt><tt class="py-string">'NULL'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">'}'</tt><tt class="py-op">,</tt> </tt>
<a name="L885"></a><tt class="py-lineno"> 885</tt>  <tt class="py-line">                     <tt class="py-string">'[]'</tt><tt class="py-op">)</tt> </tt>
<a name="L886"></a><tt class="py-lineno"> 886</tt>  <tt class="py-line">                <tt class="py-name">param_list</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'args'</tt><tt class="py-op">,</tt> <tt class="py-string">'kwargs'</tt><tt class="py-op">,</tt> <tt class="py-name">params</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-string">'(char **) '</tt> <tt class="py-op">+</tt> <tt class="py-name">keywords_var</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-name">params</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
<a name="L887"></a><tt class="py-lineno"> 887</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_parse</tt><tt class="py-op">.</tt><tt id="link-181" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_error_check" class="py-name" href="#" onclick="return doclink('link-181', 'write_error_check', 'link-102');">write_error_check</a></tt><tt class="py-op">(</tt><tt class="py-string">'!PyArg_ParseTupleAndKeywords(%s)'</tt> <tt class="py-op">%</tt> </tt>
<a name="L888"></a><tt class="py-lineno"> 888</tt>  <tt class="py-line">                                                    <tt class="py-op">(</tt><tt class="py-string">', '</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">param_list</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L889"></a><tt class="py-lineno"> 889</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">meth_flags</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">"METH_KEYWORDS"</tt><tt class="py-op">)</tt> </tt>
<a name="L890"></a><tt class="py-lineno"> 890</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L891"></a><tt class="py-lineno"> 891</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">meth_flags</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">"METH_NOARGS"</tt><tt class="py-op">)</tt> </tt>
<a name="L892"></a><tt class="py-lineno"> 892</tt>  <tt class="py-line">         </tt>
<a name="L893"></a><tt class="py-lineno"> 893</tt>  <tt class="py-line">        <tt class="py-comment">## convert the return value(s)</tt> </tt>
<a name="L894"></a><tt class="py-lineno"> 894</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">return_value</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-182" class="py-name"><a title="pybindgen.container.IterNextWrapper.HAVE_RETURN_VALUE
pybindgen.typehandlers.base.ForwardWrapperBase.HAVE_RETURN_VALUE" class="py-name" href="#" onclick="return doclink('link-182', 'HAVE_RETURN_VALUE', 'link-127');">HAVE_RETURN_VALUE</a></tt><tt class="py-op">:</tt> </tt>
<a name="L895"></a><tt class="py-lineno"> 895</tt>  <tt class="py-line"> </tt>
<a name="L896"></a><tt class="py-lineno"> 896</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">build_params</tt><tt class="py-op">.</tt><tt id="link-183" class="py-name"><a title="pybindgen.typehandlers.base.BuildValueParameters.get_parameters
pybindgen.typehandlers.base.ParseTupleParameters.get_parameters" class="py-name" href="#" onclick="return doclink('link-183', 'get_parameters', 'link-51');">get_parameters</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-op">[</tt><tt class="py-string">'""'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> \ </tt>
<a name="L897"></a><tt class="py-lineno"> 897</tt>  <tt class="py-line">                   <tt class="py-string">"this wrapper is not supposed to return values"</tt> </tt>
<a name="L898"></a><tt class="py-lineno"> 898</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_before_return_hook</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L899"></a><tt class="py-lineno"> 899</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">after_call</tt><tt class="py-op">.</tt><tt id="link-184" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_cleanup" class="py-name" href="#" onclick="return doclink('link-184', 'write_cleanup', 'link-49');">write_cleanup</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L900"></a><tt class="py-lineno"> 900</tt>  <tt class="py-line"> </tt>
<a name="L901"></a><tt class="py-lineno"> 901</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L902"></a><tt class="py-lineno"> 902</tt>  <tt class="py-line"> </tt>
<a name="L903"></a><tt class="py-lineno"> 903</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">return_value</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L904"></a><tt class="py-lineno"> 904</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L905"></a><tt class="py-lineno"> 905</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">return_value</tt><tt class="py-op">.</tt><tt id="link-185" class="py-name"><a title="pybindgen.container.ContainerParameter.convert_c_to_python
pybindgen.container.ContainerPtrParameter.convert_c_to_python
pybindgen.container.ContainerRefParameter.convert_c_to_python
pybindgen.container.ContainerReturnValue.convert_c_to_python
pybindgen.cppclass_typehandlers.CppClassParameter.convert_c_to_python
pybindgen.cppclass_typehandlers.CppClassPtrParameter.convert_c_to_python
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.convert_c_to_python
pybindgen.cppclass_typehandlers.CppClassRefParameter.convert_c_to_python
pybindgen.cppclass_typehandlers.CppClassReturnValue.convert_c_to_python
pybindgen.cppmethod.DummyParameter.convert_c_to_python
pybindgen.cppmethod.DummyReturnValue.convert_c_to_python
pybindgen.typehandlers.base.Parameter.convert_c_to_python
pybindgen.typehandlers.base.ReturnValue.convert_c_to_python
pybindgen.typehandlers.booltype.BoolParam.convert_c_to_python
pybindgen.typehandlers.booltype.BoolPtrParam.convert_c_to_python
pybindgen.typehandlers.booltype.BoolRefParam.convert_c_to_python
pybindgen.typehandlers.booltype.BoolReturn.convert_c_to_python
pybindgen.typehandlers.doubletype.DoubleParam.convert_c_to_python
pybindgen.typehandlers.doubletype.DoublePtrParam.convert_c_to_python
pybindgen.typehandlers.doubletype.DoubleRefParam.convert_c_to_python
pybindgen.typehandlers.doubletype.DoubleReturn.convert_c_to_python
pybindgen.typehandlers.floattype.FloatParam.convert_c_to_python
pybindgen.typehandlers.floattype.FloatPtrParam.convert_c_to_python
pybindgen.typehandlers.floattype.FloatRefParam.convert_c_to_python
pybindgen.typehandlers.floattype.FloatReturn.convert_c_to_python
pybindgen.typehandlers.inttype.Int16Param.convert_c_to_python
pybindgen.typehandlers.inttype.Int16Return.convert_c_to_python
pybindgen.typehandlers.inttype.Int8PtrParam.convert_c_to_python
pybindgen.typehandlers.inttype.IntParam.convert_c_to_python
pybindgen.typehandlers.inttype.IntPtrParam.convert_c_to_python
pybindgen.typehandlers.inttype.IntRefParam.convert_c_to_python
pybindgen.typehandlers.inttype.IntReturn.convert_c_to_python
pybindgen.typehandlers.inttype.LongLongParam.convert_c_to_python
pybindgen.typehandlers.inttype.LongLongReturn.convert_c_to_python
pybindgen.typehandlers.inttype.SizeTParam.convert_c_to_python
pybindgen.typehandlers.inttype.SizeTReturn.convert_c_to_python
pybindgen.typehandlers.inttype.UInt16Param.convert_c_to_python
pybindgen.typehandlers.inttype.UInt16Return.convert_c_to_python
pybindgen.typehandlers.inttype.UInt8Param.convert_c_to_python
pybindgen.typehandlers.inttype.UInt8PtrParam.convert_c_to_python
pybindgen.typehandlers.inttype.UInt8Return.convert_c_to_python
pybindgen.typehandlers.inttype.UnsignedIntParam.convert_c_to_python
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.convert_c_to_python
pybindgen.typehandlers.inttype.UnsignedIntReturn.convert_c_to_python
pybindgen.typehandlers.inttype.UnsignedLongLongParam.convert_c_to_python
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.convert_c_to_python
pybindgen.typehandlers.pyobjecttype.PyObjectParam.convert_c_to_python
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.convert_c_to_python
pybindgen.typehandlers.stringtype.CStringParam.convert_c_to_python
pybindgen.typehandlers.stringtype.CStringReturn.convert_c_to_python
pybindgen.typehandlers.stringtype.CharParam.convert_c_to_python
pybindgen.typehandlers.stringtype.CharReturn.convert_c_to_python
pybindgen.typehandlers.stringtype.StdStringParam.convert_c_to_python
pybindgen.typehandlers.stringtype.StdStringRefParam.convert_c_to_python
pybindgen.typehandlers.stringtype.StdStringReturn.convert_c_to_python
pybindgen.typehandlers.voidtype.VoidReturn.convert_c_to_python" class="py-name" href="#" onclick="return doclink('link-185', 'convert_c_to_python', 'link-98');">convert_c_to_python</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L906"></a><tt class="py-lineno"> 906</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">NotImplementedError</tt><tt class="py-op">:</tt> </tt>
<a name="L907"></a><tt class="py-lineno"> 907</tt>  <tt class="py-line">                    <tt class="py-keyword">raise</tt> <tt id="link-186" class="py-name"><a title="pybindgen.typehandlers.base.CodeGenerationError" class="py-name" href="#" onclick="return doclink('link-186', 'CodeGenerationError', 'link-170');">CodeGenerationError</a></tt><tt class="py-op">(</tt> </tt>
<a name="L908"></a><tt class="py-lineno"> 908</tt>  <tt class="py-line">                        <tt class="py-string">'convert_c_to_python method of return value %s not implemented'</tt> </tt>
<a name="L909"></a><tt class="py-lineno"> 909</tt>  <tt class="py-line">                        <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">return_value</tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L910"></a><tt class="py-lineno"> 910</tt>  <tt class="py-line"> </tt>
<a name="L911"></a><tt class="py-lineno"> 911</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_before_return_hook</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L912"></a><tt class="py-lineno"> 912</tt>  <tt class="py-line"> </tt>
<a name="L913"></a><tt class="py-lineno"> 913</tt>  <tt class="py-line">            <tt class="py-name">params</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">build_params</tt><tt class="py-op">.</tt><tt id="link-187" class="py-name"><a title="pybindgen.typehandlers.base.BuildValueParameters.get_parameters
pybindgen.typehandlers.base.ParseTupleParameters.get_parameters" class="py-name" href="#" onclick="return doclink('link-187', 'get_parameters', 'link-51');">get_parameters</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L914"></a><tt class="py-lineno"> 914</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">params</tt><tt class="py-op">:</tt> </tt>
<a name="L915"></a><tt class="py-lineno"> 915</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">params</tt> <tt class="py-op">==</tt> <tt class="py-op">[</tt><tt class="py-string">'""'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L916"></a><tt class="py-lineno"> 916</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">after_call</tt><tt class="py-op">.</tt><tt id="link-188" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-188', 'write_code', 'link-90');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">'Py_INCREF(Py_None);'</tt><tt class="py-op">)</tt> </tt>
<a name="L917"></a><tt class="py-lineno"> 917</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">after_call</tt><tt class="py-op">.</tt><tt id="link-189" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-189', 'write_code', 'link-90');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">'py_retval = Py_None;'</tt><tt class="py-op">)</tt> </tt>
<a name="L918"></a><tt class="py-lineno"> 918</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L919"></a><tt class="py-lineno"> 919</tt>  <tt class="py-line">                    <tt class="py-keyword">assert</tt> <tt class="py-name">params</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'"'</tt> </tt>
<a name="L920"></a><tt class="py-lineno"> 920</tt>  <tt class="py-line">                    <tt class="py-name">params</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">"(char *) "</tt> <tt class="py-op">+</tt> <tt class="py-name">params</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L921"></a><tt class="py-lineno"> 921</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">after_call</tt><tt class="py-op">.</tt><tt id="link-190" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-190', 'write_code', 'link-90');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">'py_retval = Py_BuildValue(%s);'</tt> <tt class="py-op">%</tt> </tt>
<a name="L922"></a><tt class="py-lineno"> 922</tt>  <tt class="py-line">                                               <tt class="py-op">(</tt><tt class="py-string">', '</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">params</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L923"></a><tt class="py-lineno"> 923</tt>  <tt class="py-line"> </tt>
<a name="L924"></a><tt class="py-lineno"> 924</tt>  <tt class="py-line">            <tt class="py-comment">## cleanup and return</tt> </tt>
<a name="L925"></a><tt class="py-lineno"> 925</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">after_call</tt><tt class="py-op">.</tt><tt id="link-191" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_cleanup" class="py-name" href="#" onclick="return doclink('link-191', 'write_cleanup', 'link-49');">write_cleanup</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L926"></a><tt class="py-lineno"> 926</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">after_call</tt><tt class="py-op">.</tt><tt id="link-192" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-192', 'write_code', 'link-90');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">'return py_retval;'</tt><tt class="py-op">)</tt> </tt>
<a name="L927"></a><tt class="py-lineno"> 927</tt>  <tt class="py-line"> </tt>
<a name="L928"></a><tt class="py-lineno"> 928</tt>  <tt class="py-line">        <tt class="py-comment">## now write out the wrapper function body itself</tt> </tt>
<a name="L929"></a><tt class="py-lineno"> 929</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt><tt class="py-op">.</tt><tt id="link-193" class="py-name"><a title="pybindgen.typehandlers.base.DeclarationsScope.get_code_sink" class="py-name" href="#" onclick="return doclink('link-193', 'get_code_sink', 'link-118');">get_code_sink</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-194" class="py-name"><a title="pybindgen.typehandlers.codesink.MemoryCodeSink.flush_to
pybindgen.typehandlers.codesink.NullCodeSink.flush_to" class="py-name" href="#" onclick="return doclink('link-194', 'flush_to', 'link-119');">flush_to</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L930"></a><tt class="py-lineno"> 930</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-195" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-195', 'writeln', 'link-29');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L931"></a><tt class="py-lineno"> 931</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_parse</tt><tt class="py-op">.</tt><tt class="py-name">sink</tt><tt class="py-op">.</tt><tt id="link-196" class="py-name"><a title="pybindgen.typehandlers.codesink.MemoryCodeSink.flush_to
pybindgen.typehandlers.codesink.NullCodeSink.flush_to" class="py-name" href="#" onclick="return doclink('link-196', 'flush_to', 'link-119');">flush_to</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L932"></a><tt class="py-lineno"> 932</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">before_call</tt><tt class="py-op">.</tt><tt class="py-name">sink</tt><tt class="py-op">.</tt><tt id="link-197" class="py-name"><a title="pybindgen.typehandlers.codesink.MemoryCodeSink.flush_to
pybindgen.typehandlers.codesink.NullCodeSink.flush_to" class="py-name" href="#" onclick="return doclink('link-197', 'flush_to', 'link-119');">flush_to</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L933"></a><tt class="py-lineno"> 933</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">after_call</tt><tt class="py-op">.</tt><tt class="py-name">sink</tt><tt class="py-op">.</tt><tt id="link-198" class="py-name"><a title="pybindgen.typehandlers.codesink.MemoryCodeSink.flush_to
pybindgen.typehandlers.codesink.NullCodeSink.flush_to" class="py-name" href="#" onclick="return doclink('link-198', 'flush_to', 'link-119');">flush_to</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
</div><a name="L934"></a><tt class="py-lineno"> 934</tt>  <tt class="py-line"> </tt>
<a name="ForwardWrapperBase.get_py_method_def_flags"></a><div id="ForwardWrapperBase.get_py_method_def_flags-def"><a name="L935"></a><tt class="py-lineno"> 935</tt> <a class="py-toggle" href="#" id="ForwardWrapperBase.get_py_method_def_flags-toggle" onclick="return toggle('ForwardWrapperBase.get_py_method_def_flags');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ForwardWrapperBase-class.html#get_py_method_def_flags">get_py_method_def_flags</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ForwardWrapperBase.get_py_method_def_flags-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ForwardWrapperBase.get_py_method_def_flags-expanded"><a name="L936"></a><tt class="py-lineno"> 936</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L937"></a><tt class="py-lineno"> 937</tt>  <tt class="py-line"><tt class="py-docstring">        Get a list of PyMethodDef flags that should be used for this wrapper.</tt> </tt>
<a name="L938"></a><tt class="py-lineno"> 938</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L939"></a><tt class="py-lineno"> 939</tt>  <tt class="py-line">        <tt class="py-name">flags</tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">meth_flags</tt><tt class="py-op">)</tt> </tt>
<a name="L940"></a><tt class="py-lineno"> 940</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">flags</tt><tt class="py-op">:</tt> </tt>
<a name="L941"></a><tt class="py-lineno"> 941</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">flags</tt><tt class="py-op">)</tt> </tt>
<a name="L942"></a><tt class="py-lineno"> 942</tt>  <tt class="py-line"> </tt>
<a name="L943"></a><tt class="py-lineno"> 943</tt>  <tt class="py-line">        <tt class="py-name">tmp_sink</tt> <tt class="py-op">=</tt> <tt id="link-199" class="py-name"><a title="pybindgen.typehandlers.codesink" class="py-name" href="#" onclick="return doclink('link-199', 'codesink', 'link-0');">codesink</a></tt><tt class="py-op">.</tt><tt id="link-200" class="py-name" targets="Class pybindgen.typehandlers.codesink.NullCodeSink=pybindgen.typehandlers.codesink.NullCodeSink-class.html"><a title="pybindgen.typehandlers.codesink.NullCodeSink" class="py-name" href="#" onclick="return doclink('link-200', 'NullCodeSink', 'link-200');">NullCodeSink</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L944"></a><tt class="py-lineno"> 944</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L945"></a><tt class="py-lineno"> 945</tt>  <tt class="py-line"><tt class="py-comment">#             try:</tt> </tt>
<a name="L946"></a><tt class="py-lineno"> 946</tt>  <tt class="py-line"><tt class="py-comment">#                 self.generate_body(tmp_sink)</tt> </tt>
<a name="L947"></a><tt class="py-lineno"> 947</tt>  <tt class="py-line"><tt class="py-comment">#             except CodegenErrorBase:</tt> </tt>
<a name="L948"></a><tt class="py-lineno"> 948</tt>  <tt class="py-line"><tt class="py-comment">#                 return []</tt> </tt>
<a name="L949"></a><tt class="py-lineno"> 949</tt>  <tt class="py-line"><tt class="py-comment">#             else:</tt> </tt>
<a name="L950"></a><tt class="py-lineno"> 950</tt>  <tt class="py-line"><tt class="py-comment">#                 return list(set(self.meth_flags))</tt> </tt>
<a name="L951"></a><tt class="py-lineno"> 951</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-201" class="py-name" targets="Method pybindgen.typehandlers.base.ForwardWrapperBase.generate_body()=pybindgen.typehandlers.base.ForwardWrapperBase-class.html#generate_body"><a title="pybindgen.typehandlers.base.ForwardWrapperBase.generate_body" class="py-name" href="#" onclick="return doclink('link-201', 'generate_body', 'link-201');">generate_body</a></tt><tt class="py-op">(</tt><tt class="py-name">tmp_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L952"></a><tt class="py-lineno"> 952</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">meth_flags</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L953"></a><tt class="py-lineno"> 953</tt>  <tt class="py-line">        <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L954"></a><tt class="py-lineno"> 954</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-202" class="py-name" targets="Method pybindgen.container.IterNextWrapper.reset_code_generation_state()=pybindgen.container.IterNextWrapper-class.html#reset_code_generation_state,Method pybindgen.overloading.OverloadedWrapper.reset_code_generation_state()=pybindgen.overloading.OverloadedWrapper-class.html#reset_code_generation_state,Method pybindgen.typehandlers.base.ForwardWrapperBase.reset_code_generation_state()=pybindgen.typehandlers.base.ForwardWrapperBase-class.html#reset_code_generation_state,Method pybindgen.typehandlers.base.ReverseWrapperBase.reset_code_generation_state()=pybindgen.typehandlers.base.ReverseWrapperBase-class.html#reset_code_generation_state"><a title="pybindgen.container.IterNextWrapper.reset_code_generation_state
pybindgen.overloading.OverloadedWrapper.reset_code_generation_state
pybindgen.typehandlers.base.ForwardWrapperBase.reset_code_generation_state
pybindgen.typehandlers.base.ReverseWrapperBase.reset_code_generation_state" class="py-name" href="#" onclick="return doclink('link-202', 'reset_code_generation_state', 'link-202');">reset_code_generation_state</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L955"></a><tt class="py-lineno"> 955</tt>  <tt class="py-line"> </tt>
<a name="L956"></a><tt class="py-lineno"> 956</tt>  <tt class="py-line"> </tt>
<a name="TypeTransformation"></a><div id="TypeTransformation-def"><a name="L957"></a><tt class="py-lineno"> 957</tt> <a class="py-toggle" href="#" id="TypeTransformation-toggle" onclick="return toggle('TypeTransformation');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.TypeTransformation-class.html">TypeTransformation</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TypeTransformation-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="TypeTransformation-expanded"><a name="L958"></a><tt class="py-lineno"> 958</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L959"></a><tt class="py-lineno"> 959</tt>  <tt class="py-line"><tt class="py-docstring">    Type transformations are used to register handling of special</tt> </tt>
<a name="L960"></a><tt class="py-lineno"> 960</tt>  <tt class="py-line"><tt class="py-docstring">    types that are simple transformation over another type that is</tt> </tt>
<a name="L961"></a><tt class="py-lineno"> 961</tt>  <tt class="py-line"><tt class="py-docstring">    already registered.  This way, only the original type is</tt> </tt>
<a name="L962"></a><tt class="py-lineno"> 962</tt>  <tt class="py-line"><tt class="py-docstring">    registered, and the type transformation only does the necessary</tt> </tt>
<a name="L963"></a><tt class="py-lineno"> 963</tt>  <tt class="py-line"><tt class="py-docstring">    adjustments over the original type handler to make it handle the</tt> </tt>
<a name="L964"></a><tt class="py-lineno"> 964</tt>  <tt class="py-line"><tt class="py-docstring">    transformed type as well.</tt> </tt>
<a name="L965"></a><tt class="py-lineno"> 965</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L966"></a><tt class="py-lineno"> 966</tt>  <tt class="py-line"><tt class="py-docstring">    This is typically used to get smart pointer templated types</tt> </tt>
<a name="L967"></a><tt class="py-lineno"> 967</tt>  <tt class="py-line"><tt class="py-docstring">    working.</tt> </tt>
<a name="L968"></a><tt class="py-lineno"> 968</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L969"></a><tt class="py-lineno"> 969</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L970"></a><tt class="py-lineno"> 970</tt>  <tt class="py-line"> </tt>
<a name="TypeTransformation.get_untransformed_name"></a><div id="TypeTransformation.get_untransformed_name-def"><a name="L971"></a><tt class="py-lineno"> 971</tt> <a class="py-toggle" href="#" id="TypeTransformation.get_untransformed_name-toggle" onclick="return toggle('TypeTransformation.get_untransformed_name');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.TypeTransformation-class.html#get_untransformed_name">get_untransformed_name</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TypeTransformation.get_untransformed_name-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="TypeTransformation.get_untransformed_name-expanded"><a name="L972"></a><tt class="py-lineno"> 972</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L973"></a><tt class="py-lineno"> 973</tt>  <tt class="py-line"><tt class="py-docstring">        Given a transformed named, get the original C type name.</tt> </tt>
<a name="L974"></a><tt class="py-lineno"> 974</tt>  <tt class="py-line"><tt class="py-docstring">        E.g., given a smart pointer transformation, MySmartPointer::</tt> </tt>
<a name="L975"></a><tt class="py-lineno"> 975</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L976"></a><tt class="py-lineno"> 976</tt>  <tt class="py-line"><tt class="py-docstring">          get_untransformed_name('MySmartPointer&lt;Foo&gt;') -&gt; 'Foo*'</tt> </tt>
<a name="L977"></a><tt class="py-lineno"> 977</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L978"></a><tt class="py-lineno"> 978</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt> </tt>
</div><a name="L979"></a><tt class="py-lineno"> 979</tt>  <tt class="py-line"> </tt>
<a name="TypeTransformation.create_type_handler"></a><div id="TypeTransformation.create_type_handler-def"><a name="L980"></a><tt class="py-lineno"> 980</tt> <a class="py-toggle" href="#" id="TypeTransformation.create_type_handler-toggle" onclick="return toggle('TypeTransformation.create_type_handler');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.TypeTransformation-class.html#create_type_handler">create_type_handler</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">type_handler_class</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TypeTransformation.create_type_handler-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="TypeTransformation.create_type_handler-expanded"><a name="L981"></a><tt class="py-lineno"> 981</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L982"></a><tt class="py-lineno"> 982</tt>  <tt class="py-line"><tt class="py-docstring">        Given a type_handler class, create an instance with proper customization.</tt> </tt>
<a name="L983"></a><tt class="py-lineno"> 983</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L984"></a><tt class="py-lineno"> 984</tt>  <tt class="py-line"><tt class="py-docstring">        @param type_handler_class: type handler class</tt> </tt>
<a name="L985"></a><tt class="py-lineno"> 985</tt>  <tt class="py-line"><tt class="py-docstring">        @param args: arguments</tt> </tt>
<a name="L986"></a><tt class="py-lineno"> 986</tt>  <tt class="py-line"><tt class="py-docstring">        @param kwargs: keywords arguments</tt> </tt>
<a name="L987"></a><tt class="py-lineno"> 987</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L988"></a><tt class="py-lineno"> 988</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt> </tt>
</div><a name="L989"></a><tt class="py-lineno"> 989</tt>  <tt class="py-line"> </tt>
<a name="TypeTransformation.transform"></a><div id="TypeTransformation.transform-def"><a name="L990"></a><tt class="py-lineno"> 990</tt> <a class="py-toggle" href="#" id="TypeTransformation.transform-toggle" onclick="return toggle('TypeTransformation.transform');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.TypeTransformation-class.html#transform">transform</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">type_handler</tt><tt class="py-op">,</tt> <tt class="py-param">declarations</tt><tt class="py-op">,</tt> <tt class="py-param">code_block</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TypeTransformation.transform-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="TypeTransformation.transform-expanded"><a name="L991"></a><tt class="py-lineno"> 991</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L992"></a><tt class="py-lineno"> 992</tt>  <tt class="py-line"><tt class="py-docstring">        Transforms a value expression of the original type to an</tt> </tt>
<a name="L993"></a><tt class="py-lineno"> 993</tt>  <tt class="py-line"><tt class="py-docstring">        equivalent value expression in the transformed type.</tt> </tt>
<a name="L994"></a><tt class="py-lineno"> 994</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L995"></a><tt class="py-lineno"> 995</tt>  <tt class="py-line"><tt class="py-docstring">        Example, with the transformation::</tt> </tt>
<a name="L996"></a><tt class="py-lineno"> 996</tt>  <tt class="py-line"><tt class="py-docstring">           'T*' -&gt; 'boost::shared_ptr&lt;T&gt;'</tt> </tt>
<a name="L997"></a><tt class="py-lineno"> 997</tt>  <tt class="py-line"><tt class="py-docstring">        Then::</tt> </tt>
<a name="L998"></a><tt class="py-lineno"> 998</tt>  <tt class="py-line"><tt class="py-docstring">           transform(wrapper, 'foo') -&gt; 'boost::shared_ptr&lt;%s&gt;(foo)' % type_handler.untransformed_ctype</tt> </tt>
<a name="L999"></a><tt class="py-lineno"> 999</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1000"></a><tt class="py-lineno">1000</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt> </tt>
</div><a name="L1001"></a><tt class="py-lineno">1001</tt>  <tt class="py-line"> </tt>
<a name="TypeTransformation.untransform"></a><div id="TypeTransformation.untransform-def"><a name="L1002"></a><tt class="py-lineno">1002</tt> <a class="py-toggle" href="#" id="TypeTransformation.untransform-toggle" onclick="return toggle('TypeTransformation.untransform');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.TypeTransformation-class.html#untransform">untransform</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">type_handler</tt><tt class="py-op">,</tt> <tt class="py-param">declarations</tt><tt class="py-op">,</tt> <tt class="py-param">code_block</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TypeTransformation.untransform-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="TypeTransformation.untransform-expanded"><a name="L1003"></a><tt class="py-lineno">1003</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1004"></a><tt class="py-lineno">1004</tt>  <tt class="py-line"><tt class="py-docstring">        Transforms a value expression of the transformed type to an</tt> </tt>
<a name="L1005"></a><tt class="py-lineno">1005</tt>  <tt class="py-line"><tt class="py-docstring">        equivalent value expression in the original type.</tt> </tt>
<a name="L1006"></a><tt class="py-lineno">1006</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1007"></a><tt class="py-lineno">1007</tt>  <tt class="py-line"><tt class="py-docstring">        Example, with the transformation::</tt> </tt>
<a name="L1008"></a><tt class="py-lineno">1008</tt>  <tt class="py-line"><tt class="py-docstring">          'T*' -&gt; 'boost::shared_ptr&lt;T&gt;'</tt> </tt>
<a name="L1009"></a><tt class="py-lineno">1009</tt>  <tt class="py-line"><tt class="py-docstring">        Then::</tt> </tt>
<a name="L1010"></a><tt class="py-lineno">1010</tt>  <tt class="py-line"><tt class="py-docstring">           untransform(wrapper, 'foo') -&gt; 'foo-&gt;get_pointer()'</tt> </tt>
<a name="L1011"></a><tt class="py-lineno">1011</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1012"></a><tt class="py-lineno">1012</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt> </tt>
</div></div><a name="L1013"></a><tt class="py-lineno">1013</tt>  <tt class="py-line"> </tt>
<a name="L1014"></a><tt class="py-lineno">1014</tt>  <tt class="py-line"> </tt>
<a name="NullTypeTransformation"></a><div id="NullTypeTransformation-def"><a name="L1015"></a><tt class="py-lineno">1015</tt> <a class="py-toggle" href="#" id="NullTypeTransformation-toggle" onclick="return toggle('NullTypeTransformation');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.NullTypeTransformation-class.html">NullTypeTransformation</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NullTypeTransformation-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="NullTypeTransformation-expanded"><a name="L1016"></a><tt class="py-lineno">1016</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L1017"></a><tt class="py-lineno">1017</tt>  <tt class="py-line"><tt class="py-docstring">    Null type transformation, returns everything unchanged.</tt> </tt>
<a name="L1018"></a><tt class="py-lineno">1018</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="NullTypeTransformation.get_untransformed_name"></a><div id="NullTypeTransformation.get_untransformed_name-def"><a name="L1019"></a><tt class="py-lineno">1019</tt> <a class="py-toggle" href="#" id="NullTypeTransformation.get_untransformed_name-toggle" onclick="return toggle('NullTypeTransformation.get_untransformed_name');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.NullTypeTransformation-class.html#get_untransformed_name">get_untransformed_name</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NullTypeTransformation.get_untransformed_name-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="NullTypeTransformation.get_untransformed_name-expanded"><a name="L1020"></a><tt class="py-lineno">1020</tt>  <tt class="py-line">        <tt class="py-docstring">"identity transformation"</tt> </tt>
<a name="L1021"></a><tt class="py-lineno">1021</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-203" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-203', 'name', 'link-4');">name</a></tt> </tt>
</div><a name="NullTypeTransformation.create_type_handler"></a><div id="NullTypeTransformation.create_type_handler-def"><a name="L1022"></a><tt class="py-lineno">1022</tt> <a class="py-toggle" href="#" id="NullTypeTransformation.create_type_handler-toggle" onclick="return toggle('NullTypeTransformation.create_type_handler');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.NullTypeTransformation-class.html#create_type_handler">create_type_handler</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">type_handler_class</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NullTypeTransformation.create_type_handler-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="NullTypeTransformation.create_type_handler-expanded"><a name="L1023"></a><tt class="py-lineno">1023</tt>  <tt class="py-line">        <tt class="py-docstring">"identity transformation"</tt> </tt>
<a name="L1024"></a><tt class="py-lineno">1024</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">type_handler_class</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
</div><a name="NullTypeTransformation.transform"></a><div id="NullTypeTransformation.transform-def"><a name="L1025"></a><tt class="py-lineno">1025</tt> <a class="py-toggle" href="#" id="NullTypeTransformation.transform-toggle" onclick="return toggle('NullTypeTransformation.transform');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.NullTypeTransformation-class.html#transform">transform</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">type_handler</tt><tt class="py-op">,</tt> <tt class="py-param">declarations</tt><tt class="py-op">,</tt> <tt class="py-param">code_block</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NullTypeTransformation.transform-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="NullTypeTransformation.transform-expanded"><a name="L1026"></a><tt class="py-lineno">1026</tt>  <tt class="py-line">        <tt class="py-docstring">"identity transformation"</tt> </tt>
<a name="L1027"></a><tt class="py-lineno">1027</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">value</tt> </tt>
</div><a name="NullTypeTransformation.untransform"></a><div id="NullTypeTransformation.untransform-def"><a name="L1028"></a><tt class="py-lineno">1028</tt> <a class="py-toggle" href="#" id="NullTypeTransformation.untransform-toggle" onclick="return toggle('NullTypeTransformation.untransform');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.NullTypeTransformation-class.html#untransform">untransform</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">type_handler</tt><tt class="py-op">,</tt> <tt class="py-param">declarations</tt><tt class="py-op">,</tt> <tt class="py-param">code_block</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NullTypeTransformation.untransform-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="NullTypeTransformation.untransform-expanded"><a name="L1029"></a><tt class="py-lineno">1029</tt>  <tt class="py-line">        <tt class="py-docstring">"identity transformation"</tt> </tt>
<a name="L1030"></a><tt class="py-lineno">1030</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">value</tt> </tt>
</div></div><a name="L1031"></a><tt class="py-lineno">1031</tt>  <tt class="py-line"> </tt>
<a name="TypeHandler"></a><div id="TypeHandler-def"><a name="L1032"></a><tt class="py-lineno">1032</tt> <a class="py-toggle" href="#" id="TypeHandler-toggle" onclick="return toggle('TypeHandler');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.TypeHandler-class.html">TypeHandler</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TypeHandler-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="TypeHandler-expanded"><a name="L1033"></a><tt class="py-lineno">1033</tt>  <tt class="py-line">    <tt id="link-204" class="py-name" targets="Variable pybindgen.cppclass_typehandlers.CppClassPtrParameter.SUPPORTS_TRANSFORMATIONS=pybindgen.cppclass_typehandlers.CppClassPtrParameter-class.html#SUPPORTS_TRANSFORMATIONS,Variable pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.SUPPORTS_TRANSFORMATIONS=pybindgen.cppclass_typehandlers.CppClassPtrReturnValue-class.html#SUPPORTS_TRANSFORMATIONS,Variable pybindgen.typehandlers.base.Parameter.SUPPORTS_TRANSFORMATIONS=pybindgen.typehandlers.base.Parameter-class.html#SUPPORTS_TRANSFORMATIONS,Variable pybindgen.typehandlers.base.ReturnValue.SUPPORTS_TRANSFORMATIONS=pybindgen.typehandlers.base.ReturnValue-class.html#SUPPORTS_TRANSFORMATIONS,Variable pybindgen.typehandlers.base.TypeHandler.SUPPORTS_TRANSFORMATIONS=pybindgen.typehandlers.base.TypeHandler-class.html#SUPPORTS_TRANSFORMATIONS"><a title="pybindgen.cppclass_typehandlers.CppClassPtrParameter.SUPPORTS_TRANSFORMATIONS
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.SUPPORTS_TRANSFORMATIONS
pybindgen.typehandlers.base.Parameter.SUPPORTS_TRANSFORMATIONS
pybindgen.typehandlers.base.ReturnValue.SUPPORTS_TRANSFORMATIONS
pybindgen.typehandlers.base.TypeHandler.SUPPORTS_TRANSFORMATIONS" class="py-name" href="#" onclick="return doclink('link-204', 'SUPPORTS_TRANSFORMATIONS', 'link-204');">SUPPORTS_TRANSFORMATIONS</a></tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1034"></a><tt class="py-lineno">1034</tt>  <tt class="py-line"> </tt>
<a name="TypeHandler.__init__"></a><div id="TypeHandler.__init__-def"><a name="L1035"></a><tt class="py-lineno">1035</tt> <a class="py-toggle" href="#" id="TypeHandler.__init__-toggle" onclick="return toggle('TypeHandler.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.TypeHandler-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">ctype</tt><tt class="py-op">,</tt> <tt class="py-param">is_const</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TypeHandler.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="TypeHandler.__init__-expanded"><a name="L1036"></a><tt class="py-lineno">1036</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">ctype</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1037"></a><tt class="py-lineno">1037</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1038"></a><tt class="py-lineno">1038</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">untransformed_ctype</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1039"></a><tt class="py-lineno">1039</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">type_traits</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1040"></a><tt class="py-lineno">1040</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1041"></a><tt class="py-lineno">1041</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">ctype</tt><tt class="py-op">,</tt> <tt id="link-205" class="py-name"><a title="pybindgen.typehandlers.ctypeparser" class="py-name" href="#" onclick="return doclink('link-205', 'ctypeparser', 'link-1');">ctypeparser</a></tt><tt class="py-op">.</tt><tt id="link-206" class="py-name" targets="Class pybindgen.typehandlers.ctypeparser.TypeTraits=pybindgen.typehandlers.ctypeparser.TypeTraits-class.html"><a title="pybindgen.typehandlers.ctypeparser.TypeTraits" class="py-name" href="#" onclick="return doclink('link-206', 'TypeTraits', 'link-206');">TypeTraits</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1042"></a><tt class="py-lineno">1042</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">type_traits</tt> <tt class="py-op">=</tt> <tt class="py-name">ctype</tt> </tt>
<a name="L1043"></a><tt class="py-lineno">1043</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">is_const</tt><tt class="py-op">:</tt> </tt>
<a name="L1044"></a><tt class="py-lineno">1044</tt>  <tt class="py-line">                    <tt class="py-name">warnings</tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">"is_const is deprecated, put a 'const' in the C type instead."</tt><tt class="py-op">,</tt> <tt class="py-name">DeprecationWarning</tt><tt class="py-op">)</tt> </tt>
<a name="L1045"></a><tt class="py-lineno">1045</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">type_traits</tt><tt class="py-op">.</tt><tt class="py-name">type_is_pointer</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">type_traits</tt><tt class="py-op">.</tt><tt class="py-name">type_is_reference</tt><tt class="py-op">:</tt> </tt>
<a name="L1046"></a><tt class="py-lineno">1046</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">type_traits</tt><tt class="py-op">.</tt><tt id="link-207" class="py-name" targets="Method pybindgen.typehandlers.ctypeparser.TypeTraits.make_target_const()=pybindgen.typehandlers.ctypeparser.TypeTraits-class.html#make_target_const"><a title="pybindgen.typehandlers.ctypeparser.TypeTraits.make_target_const" class="py-name" href="#" onclick="return doclink('link-207', 'make_target_const', 'link-207');">make_target_const</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1047"></a><tt class="py-lineno">1047</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1048"></a><tt class="py-lineno">1048</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">type_traits</tt><tt class="py-op">.</tt><tt id="link-208" class="py-name" targets="Method pybindgen.typehandlers.ctypeparser.TypeTraits.make_const()=pybindgen.typehandlers.ctypeparser.TypeTraits-class.html#make_const"><a title="pybindgen.typehandlers.ctypeparser.TypeTraits.make_const" class="py-name" href="#" onclick="return doclink('link-208', 'make_const', 'link-208');">make_const</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1049"></a><tt class="py-lineno">1049</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">ctype</tt><tt class="py-op">,</tt> <tt class="py-name">basestring</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1050"></a><tt class="py-lineno">1050</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">is_const</tt><tt class="py-op">:</tt> </tt>
<a name="L1051"></a><tt class="py-lineno">1051</tt>  <tt class="py-line">                    <tt class="py-name">warnings</tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">"is_const is deprecated, put a 'const' in the C type instead."</tt><tt class="py-op">,</tt> <tt class="py-name">DeprecationWarning</tt><tt class="py-op">)</tt> </tt>
<a name="L1052"></a><tt class="py-lineno">1052</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">type_traits</tt> <tt class="py-op">=</tt> <tt id="link-209" class="py-name"><a title="pybindgen.typehandlers.ctypeparser" class="py-name" href="#" onclick="return doclink('link-209', 'ctypeparser', 'link-1');">ctypeparser</a></tt><tt class="py-op">.</tt><tt id="link-210" class="py-name"><a title="pybindgen.typehandlers.ctypeparser.TypeTraits" class="py-name" href="#" onclick="return doclink('link-210', 'TypeTraits', 'link-206');">TypeTraits</a></tt><tt class="py-op">(</tt><tt class="py-string">'const %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">ctype</tt><tt class="py-op">)</tt> </tt>
<a name="L1053"></a><tt class="py-lineno">1053</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1054"></a><tt class="py-lineno">1054</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">type_traits</tt> <tt class="py-op">=</tt> <tt id="link-211" class="py-name"><a title="pybindgen.typehandlers.ctypeparser" class="py-name" href="#" onclick="return doclink('link-211', 'ctypeparser', 'link-1');">ctypeparser</a></tt><tt class="py-op">.</tt><tt id="link-212" class="py-name"><a title="pybindgen.typehandlers.ctypeparser.TypeTraits" class="py-name" href="#" onclick="return doclink('link-212', 'TypeTraits', 'link-206');">TypeTraits</a></tt><tt class="py-op">(</tt><tt class="py-name">ctype</tt><tt class="py-op">)</tt> </tt>
<a name="L1055"></a><tt class="py-lineno">1055</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1056"></a><tt class="py-lineno">1056</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt> </tt>
<a name="L1057"></a><tt class="py-lineno">1057</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">type_traits</tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt><tt class="py-op">)</tt> </tt>
<a name="L1058"></a><tt class="py-lineno">1058</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">untransformed_ctype</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt> </tt>
<a name="L1059"></a><tt class="py-lineno">1059</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">transformation</tt> <tt class="py-op">=</tt> <tt id="link-213" class="py-name" targets="Class pybindgen.typehandlers.base.NullTypeTransformation=pybindgen.typehandlers.base.NullTypeTransformation-class.html"><a title="pybindgen.typehandlers.base.NullTypeTransformation" class="py-name" href="#" onclick="return doclink('link-213', 'NullTypeTransformation', 'link-213');">NullTypeTransformation</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1060"></a><tt class="py-lineno">1060</tt>  <tt class="py-line"> </tt>
<a name="TypeHandler._get_ctype_no_const"></a><div id="TypeHandler._get_ctype_no_const-def"><a name="L1061"></a><tt class="py-lineno">1061</tt> <a class="py-toggle" href="#" id="TypeHandler._get_ctype_no_const-toggle" onclick="return toggle('TypeHandler._get_ctype_no_const');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.TypeHandler-class.html#_get_ctype_no_const">_get_ctype_no_const</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TypeHandler._get_ctype_no_const-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="TypeHandler._get_ctype_no_const-expanded"><a name="L1062"></a><tt class="py-lineno">1062</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">type_traits</tt><tt class="py-op">.</tt><tt id="link-214" class="py-name"><a title="pybindgen.typehandlers.base.TypeHandler.ctype_no_const" class="py-name" href="#" onclick="return doclink('link-214', 'ctype_no_const', 'link-144');">ctype_no_const</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L1063"></a><tt class="py-lineno">1063</tt>  <tt class="py-line">    <tt id="link-215" class="py-name"><a title="pybindgen.typehandlers.base.TypeHandler.ctype_no_const" class="py-name" href="#" onclick="return doclink('link-215', 'ctype_no_const', 'link-144');">ctype_no_const</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-216" class="py-name" targets="Method pybindgen.typehandlers.base.TypeHandler._get_ctype_no_const()=pybindgen.typehandlers.base.TypeHandler-class.html#_get_ctype_no_const"><a title="pybindgen.typehandlers.base.TypeHandler._get_ctype_no_const" class="py-name" href="#" onclick="return doclink('link-216', '_get_ctype_no_const', 'link-216');">_get_ctype_no_const</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1064"></a><tt class="py-lineno">1064</tt>  <tt class="py-line"> </tt>
<a name="TypeHandler.set_tranformation"></a><div id="TypeHandler.set_tranformation-def"><a name="L1065"></a><tt class="py-lineno">1065</tt> <a class="py-toggle" href="#" id="TypeHandler.set_tranformation-toggle" onclick="return toggle('TypeHandler.set_tranformation');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.TypeHandler-class.html#set_tranformation">set_tranformation</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">transformation</tt><tt class="py-op">,</tt> <tt class="py-param">untransformed_ctype</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TypeHandler.set_tranformation-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="TypeHandler.set_tranformation-expanded"><a name="L1066"></a><tt class="py-lineno">1066</tt>  <tt class="py-line">        <tt class="py-name">warnings</tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">"Typo: set_tranformation -&gt; set_transformation"</tt><tt class="py-op">,</tt> <tt class="py-name">DeprecationWarning</tt><tt class="py-op">,</tt> <tt class="py-name">stacklevel</tt><tt class="py-op">=</tt><tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
<a name="L1067"></a><tt class="py-lineno">1067</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-217" class="py-name" targets="Method pybindgen.typehandlers.base.TypeHandler.set_transformation()=pybindgen.typehandlers.base.TypeHandler-class.html#set_transformation"><a title="pybindgen.typehandlers.base.TypeHandler.set_transformation" class="py-name" href="#" onclick="return doclink('link-217', 'set_transformation', 'link-217');">set_transformation</a></tt><tt class="py-op">(</tt><tt class="py-name">transformation</tt><tt class="py-op">,</tt> <tt class="py-name">untransformed_ctype</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1068"></a><tt class="py-lineno">1068</tt>  <tt class="py-line"> </tt>
<a name="TypeHandler.set_transformation"></a><div id="TypeHandler.set_transformation-def"><a name="L1069"></a><tt class="py-lineno">1069</tt> <a class="py-toggle" href="#" id="TypeHandler.set_transformation-toggle" onclick="return toggle('TypeHandler.set_transformation');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.TypeHandler-class.html#set_transformation">set_transformation</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">transformation</tt><tt class="py-op">,</tt> <tt class="py-param">untransformed_ctype</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TypeHandler.set_transformation-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="TypeHandler.set_transformation-expanded"><a name="L1070"></a><tt class="py-lineno">1070</tt>  <tt class="py-line">        <tt class="py-docstring">"Set the type transformation to use in this type handler"</tt> </tt>
<a name="L1071"></a><tt class="py-lineno">1071</tt>  <tt class="py-line"> </tt>
<a name="L1072"></a><tt class="py-lineno">1072</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">transformation</tt><tt class="py-op">,</tt> <tt id="link-218" class="py-name" targets="Class pybindgen.typehandlers.base.TypeTransformation=pybindgen.typehandlers.base.TypeTransformation-class.html"><a title="pybindgen.typehandlers.base.TypeTransformation" class="py-name" href="#" onclick="return doclink('link-218', 'TypeTransformation', 'link-218');">TypeTransformation</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1073"></a><tt class="py-lineno">1073</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">untransformed_ctype</tt> <tt class="py-op">!=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt> </tt>
<a name="L1074"></a><tt class="py-lineno">1074</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">transformation</tt><tt class="py-op">,</tt> <tt id="link-219" class="py-name"><a title="pybindgen.typehandlers.base.NullTypeTransformation" class="py-name" href="#" onclick="return doclink('link-219', 'NullTypeTransformation', 'link-213');">NullTypeTransformation</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1075"></a><tt class="py-lineno">1075</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-220" class="py-name"><a title="pybindgen.cppclass_typehandlers.CppClassPtrParameter.SUPPORTS_TRANSFORMATIONS
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.SUPPORTS_TRANSFORMATIONS
pybindgen.typehandlers.base.Parameter.SUPPORTS_TRANSFORMATIONS
pybindgen.typehandlers.base.ReturnValue.SUPPORTS_TRANSFORMATIONS
pybindgen.typehandlers.base.TypeHandler.SUPPORTS_TRANSFORMATIONS" class="py-name" href="#" onclick="return doclink('link-220', 'SUPPORTS_TRANSFORMATIONS', 'link-204');">SUPPORTS_TRANSFORMATIONS</a></tt> </tt>
<a name="L1076"></a><tt class="py-lineno">1076</tt>  <tt class="py-line"> </tt>
<a name="L1077"></a><tt class="py-lineno">1077</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">transformation</tt> <tt class="py-op">=</tt> <tt class="py-name">transformation</tt> </tt>
<a name="L1078"></a><tt class="py-lineno">1078</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">untransformed_ctype</tt> <tt class="py-op">=</tt> <tt class="py-name">untransformed_ctype</tt> </tt>
</div></div><a name="L1079"></a><tt class="py-lineno">1079</tt>  <tt class="py-line"> </tt>
<a name="L1080"></a><tt class="py-lineno">1080</tt>  <tt class="py-line"> </tt>
<a name="ReturnValue"></a><div id="ReturnValue-def"><a name="L1081"></a><tt class="py-lineno">1081</tt> <a class="py-toggle" href="#" id="ReturnValue-toggle" onclick="return toggle('ReturnValue');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ReturnValue-class.html">ReturnValue</a><tt class="py-op">(</tt><tt class="py-base-class">TypeHandler</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReturnValue-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="ReturnValue-expanded"><a name="L1082"></a><tt class="py-lineno">1082</tt>  <tt class="py-line">    <tt class="py-docstring">'''Abstract base class for all classes dedicated to handle</tt> </tt>
<a name="L1083"></a><tt class="py-lineno">1083</tt>  <tt class="py-line"><tt class="py-docstring">    specific return value types'''</tt> </tt>
<a name="L1084"></a><tt class="py-lineno">1084</tt>  <tt class="py-line"> </tt>
<a name="L1085"></a><tt class="py-lineno">1085</tt>  <tt class="py-line">    <tt class="py-comment">## list of C type names it can handle</tt> </tt>
<a name="L1086"></a><tt class="py-lineno">1086</tt>  <tt class="py-line">    <tt id="link-221" class="py-name" targets="Variable pybindgen.container.ContainerParameter.CTYPES=pybindgen.container.ContainerParameter-class.html#CTYPES,Variable pybindgen.container.ContainerParameterBase.CTYPES=pybindgen.container.ContainerParameterBase-class.html#CTYPES,Variable pybindgen.container.ContainerPtrParameter.CTYPES=pybindgen.container.ContainerPtrParameter-class.html#CTYPES,Variable pybindgen.container.ContainerRefParameter.CTYPES=pybindgen.container.ContainerRefParameter-class.html#CTYPES,Variable pybindgen.container.ContainerReturnValue.CTYPES=pybindgen.container.ContainerReturnValue-class.html#CTYPES,Variable pybindgen.container.ContainerReturnValueBase.CTYPES=pybindgen.container.ContainerReturnValueBase-class.html#CTYPES,Variable pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES=pybindgen.cppclass_typehandlers.CppClassParameter-class.html#CTYPES,Variable pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES=pybindgen.cppclass_typehandlers.CppClassParameterBase-class.html#CTYPES,Variable pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES=pybindgen.cppclass_typehandlers.CppClassPtrParameter-class.html#CTYPES,Variable pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES=pybindgen.cppclass_typehandlers.CppClassPtrReturnValue-class.html#CTYPES,Variable pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES=pybindgen.cppclass_typehandlers.CppClassRefParameter-class.html#CTYPES,Variable pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES=pybindgen.cppclass_typehandlers.CppClassReturnValue-class.html#CTYPES,Variable pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES=pybindgen.cppclass_typehandlers.CppClassReturnValueBase-class.html#CTYPES,Variable pybindgen.cppmethod.DummyParameter.CTYPES=pybindgen.cppmethod.DummyParameter-class.html#CTYPES,Variable pybindgen.cppmethod.DummyReturnValue.CTYPES=pybindgen.cppmethod.DummyReturnValue-class.html#CTYPES,Variable pybindgen.typehandlers.base.Parameter.CTYPES=pybindgen.typehandlers.base.Parameter-class.html#CTYPES,Variable pybindgen.typehandlers.base.PointerParameter.CTYPES=pybindgen.typehandlers.base.PointerParameter-class.html#CTYPES,Variable pybindgen.typehandlers.base.PointerReturnValue.CTYPES=pybindgen.typehandlers.base.PointerReturnValue-class.html#CTYPES,Variable pybindgen.typehandlers.base.ReturnValue.CTYPES=pybindgen.typehandlers.base.ReturnValue-class.html#CTYPES,Variable pybindgen.typehandlers.booltype.BoolParam.CTYPES=pybindgen.typehandlers.booltype.BoolParam-class.html#CTYPES,Variable pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES=pybindgen.typehandlers.booltype.BoolPtrParam-class.html#CTYPES,Variable pybindgen.typehandlers.booltype.BoolRefParam.CTYPES=pybindgen.typehandlers.booltype.BoolRefParam-class.html#CTYPES,Variable pybindgen.typehandlers.booltype.BoolReturn.CTYPES=pybindgen.typehandlers.booltype.BoolReturn-class.html#CTYPES,Variable pybindgen.typehandlers.doubletype.DoubleParam.CTYPES=pybindgen.typehandlers.doubletype.DoubleParam-class.html#CTYPES,Variable pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES=pybindgen.typehandlers.doubletype.DoublePtrParam-class.html#CTYPES,Variable pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES=pybindgen.typehandlers.doubletype.DoubleRefParam-class.html#CTYPES,Variable pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES=pybindgen.typehandlers.doubletype.DoubleReturn-class.html#CTYPES,Variable pybindgen.typehandlers.floattype.FloatParam.CTYPES=pybindgen.typehandlers.floattype.FloatParam-class.html#CTYPES,Variable pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES=pybindgen.typehandlers.floattype.FloatPtrParam-class.html#CTYPES,Variable pybindgen.typehandlers.floattype.FloatRefParam.CTYPES=pybindgen.typehandlers.floattype.FloatRefParam-class.html#CTYPES,Variable pybindgen.typehandlers.floattype.FloatReturn.CTYPES=pybindgen.typehandlers.floattype.FloatReturn-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.Int16Param.CTYPES=pybindgen.typehandlers.inttype.Int16Param-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.Int16Return.CTYPES=pybindgen.typehandlers.inttype.Int16Return-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES=pybindgen.typehandlers.inttype.Int8PtrParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.IntParam.CTYPES=pybindgen.typehandlers.inttype.IntParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.IntPtrParam.CTYPES=pybindgen.typehandlers.inttype.IntPtrParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.IntRefParam.CTYPES=pybindgen.typehandlers.inttype.IntRefParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.IntReturn.CTYPES=pybindgen.typehandlers.inttype.IntReturn-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.LongLongParam.CTYPES=pybindgen.typehandlers.inttype.LongLongParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES=pybindgen.typehandlers.inttype.LongLongRefParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.LongLongReturn.CTYPES=pybindgen.typehandlers.inttype.LongLongReturn-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.SizeTParam.CTYPES=pybindgen.typehandlers.inttype.SizeTParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.SizeTReturn.CTYPES=pybindgen.typehandlers.inttype.SizeTReturn-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UInt16Param.CTYPES=pybindgen.typehandlers.inttype.UInt16Param-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UInt16Return.CTYPES=pybindgen.typehandlers.inttype.UInt16Return-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UInt8Param.CTYPES=pybindgen.typehandlers.inttype.UInt8Param-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES=pybindgen.typehandlers.inttype.UInt8PtrParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UInt8Return.CTYPES=pybindgen.typehandlers.inttype.UInt8Return-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES=pybindgen.typehandlers.inttype.UnsignedIntParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES=pybindgen.typehandlers.inttype.UnsignedIntPtrParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES=pybindgen.typehandlers.inttype.UnsignedIntReturn-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES=pybindgen.typehandlers.inttype.UnsignedLongLongParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES=pybindgen.typehandlers.inttype.UnsignedLongLongRefParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES=pybindgen.typehandlers.inttype.UnsignedLongLongReturn-class.html#CTYPES,Variable pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES=pybindgen.typehandlers.pyobjecttype.PyObjectParam-class.html#CTYPES,Variable pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES=pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue-class.html#CTYPES,Variable pybindgen.typehandlers.stringtype.CStringParam.CTYPES=pybindgen.typehandlers.stringtype.CStringParam-class.html#CTYPES,Variable pybindgen.typehandlers.stringtype.CStringReturn.CTYPES=pybindgen.typehandlers.stringtype.CStringReturn-class.html#CTYPES,Variable pybindgen.typehandlers.stringtype.CharParam.CTYPES=pybindgen.typehandlers.stringtype.CharParam-class.html#CTYPES,Variable pybindgen.typehandlers.stringtype.CharReturn.CTYPES=pybindgen.typehandlers.stringtype.CharReturn-class.html#CTYPES,Variable pybindgen.typehandlers.stringtype.StdStringParam.CTYPES=pybindgen.typehandlers.stringtype.StdStringParam-class.html#CTYPES,Variable pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES=pybindgen.typehandlers.stringtype.StdStringRefParam-class.html#CTYPES,Variable pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES=pybindgen.typehandlers.stringtype.StdStringReturn-class.html#CTYPES,Variable pybindgen.typehandlers.voidtype.VoidReturn.CTYPES=pybindgen.typehandlers.voidtype.VoidReturn-class.html#CTYPES"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-221', 'CTYPES', 'link-221');">CTYPES</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L1087"></a><tt class="py-lineno">1087</tt>  <tt class="py-line"> </tt>
<a name="L1088"></a><tt class="py-lineno">1088</tt>  <tt class="py-line">    <tt class="py-comment">## whether it supports type transformations</tt> </tt>
<a name="L1089"></a><tt class="py-lineno">1089</tt>  <tt class="py-line">    <tt id="link-222" class="py-name"><a title="pybindgen.cppclass_typehandlers.CppClassPtrParameter.SUPPORTS_TRANSFORMATIONS
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.SUPPORTS_TRANSFORMATIONS
pybindgen.typehandlers.base.Parameter.SUPPORTS_TRANSFORMATIONS
pybindgen.typehandlers.base.ReturnValue.SUPPORTS_TRANSFORMATIONS
pybindgen.typehandlers.base.TypeHandler.SUPPORTS_TRANSFORMATIONS" class="py-name" href="#" onclick="return doclink('link-222', 'SUPPORTS_TRANSFORMATIONS', 'link-204');">SUPPORTS_TRANSFORMATIONS</a></tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1090"></a><tt class="py-lineno">1090</tt>  <tt class="py-line">     </tt>
<a name="L1091"></a><tt class="py-lineno">1091</tt>  <tt class="py-line">    <tt id="link-223" class="py-name"><a title="pybindgen.cppclass_typehandlers.CppClassReturnValue.REQUIRES_ASSIGNMENT_CONSTRUCTOR
pybindgen.typehandlers.base.ReturnValue.REQUIRES_ASSIGNMENT_CONSTRUCTOR" class="py-name" href="#" onclick="return doclink('link-223', 'REQUIRES_ASSIGNMENT_CONSTRUCTOR', 'link-94');">REQUIRES_ASSIGNMENT_CONSTRUCTOR</a></tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1092"></a><tt class="py-lineno">1092</tt>  <tt class="py-line"> </tt>
<a name="ReturnValue.__metaclass__"></a><div id="ReturnValue.__metaclass__-def"><a name="L1093"></a><tt class="py-lineno">1093</tt> <a class="py-toggle" href="#" id="ReturnValue.__metaclass__-toggle" onclick="return toggle('ReturnValue.__metaclass__');">-</a><tt class="py-line">    <tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ReturnValue.__metaclass__-class.html">__metaclass__</a><tt class="py-op">(</tt><tt class="py-base-class">type</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReturnValue.__metaclass__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReturnValue.__metaclass__-expanded"><a name="L1094"></a><tt class="py-lineno">1094</tt>  <tt class="py-line">        <tt class="py-docstring">"Metaclass for automatically registering parameter type handlers"</tt> </tt>
<a name="ReturnValue.__metaclass__.__init__"></a><div id="ReturnValue.__metaclass__.__init__-def"><a name="L1095"></a><tt class="py-lineno">1095</tt> <a class="py-toggle" href="#" id="ReturnValue.__metaclass__.__init__-toggle" onclick="return toggle('ReturnValue.__metaclass__.__init__');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ReturnValue.__metaclass__-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">mcs</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">bases</tt><tt class="py-op">,</tt> <tt class="py-param">dict_</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReturnValue.__metaclass__.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++++++++++"></div><div id="ReturnValue.__metaclass__.__init__-expanded"><a name="L1096"></a><tt class="py-lineno">1096</tt>  <tt class="py-line">            <tt class="py-docstring">"metaclass __init__"</tt> </tt>
<a name="L1097"></a><tt class="py-lineno">1097</tt>  <tt class="py-line">            <tt class="py-name">type</tt><tt class="py-op">.</tt><tt id="link-224" class="py-name" targets="Method pybindgen.container.Container.__init__()=pybindgen.container.Container-class.html#__init__,Method pybindgen.container.ContainerParameterBase.__init__()=pybindgen.container.ContainerParameterBase-class.html#__init__,Method pybindgen.container.ContainerPtrParameter.__init__()=pybindgen.container.ContainerPtrParameter-class.html#__init__,Method pybindgen.container.ContainerReturnValue.__init__()=pybindgen.container.ContainerReturnValue-class.html#__init__,Method pybindgen.container.ContainerReturnValueBase.__init__()=pybindgen.container.ContainerReturnValueBase-class.html#__init__,Method pybindgen.container.ContainerTraits.__init__()=pybindgen.container.ContainerTraits-class.html#__init__,Method pybindgen.container.IterNextWrapper.__init__()=pybindgen.container.IterNextWrapper-class.html#__init__,Method pybindgen.converter_functions.CToPythonConverter.__init__()=pybindgen.converter_functions.CToPythonConverter-class.html#__init__,Method pybindgen.converter_functions.PythonToCConverter.__init__()=pybindgen.converter_functions.PythonToCConverter-class.html#__init__,Method pybindgen.cppattribute.CppInstanceAttributeGetter.__init__()=pybindgen.cppattribute.CppInstanceAttributeGetter-class.html#__init__,Method pybindgen.cppattribute.CppInstanceAttributeSetter.__init__()=pybindgen.cppattribute.CppInstanceAttributeSetter-class.html#__init__,Method pybindgen.cppattribute.CppStaticAttributeGetter.__init__()=pybindgen.cppattribute.CppStaticAttributeGetter-class.html#__init__,Method pybindgen.cppattribute.CppStaticAttributeSetter.__init__()=pybindgen.cppattribute.CppStaticAttributeSetter-class.html#__init__,Method pybindgen.cppattribute.PyGetSetDef.__init__()=pybindgen.cppattribute.PyGetSetDef-class.html#__init__,Method pybindgen.cppattribute.PyMetaclass.__init__()=pybindgen.cppattribute.PyMetaclass-class.html#__init__,Method pybindgen.cppclass.CppClass.__init__()=pybindgen.cppclass.CppClass-class.html#__init__,Method pybindgen.cppclass.CppHelperClass.__init__()=pybindgen.cppclass.CppHelperClass-class.html#__init__,Method pybindgen.cppclass.FreeFunctionPolicy.__init__()=pybindgen.cppclass.FreeFunctionPolicy-class.html#__init__,Method pybindgen.cppclass.MemoryPolicy.__init__()=pybindgen.cppclass.MemoryPolicy-class.html#__init__,Method pybindgen.cppclass.ReferenceCountingFunctionsPolicy.__init__()=pybindgen.cppclass.ReferenceCountingFunctionsPolicy-class.html#__init__,Method pybindgen.cppclass.ReferenceCountingMethodsPolicy.__init__()=pybindgen.cppclass.ReferenceCountingMethodsPolicy-class.html#__init__,Method pybindgen.cppclass_typehandlers.CppClassParameterBase.__init__()=pybindgen.cppclass_typehandlers.CppClassParameterBase-class.html#__init__,Method pybindgen.cppclass_typehandlers.CppClassPtrParameter.__init__()=pybindgen.cppclass_typehandlers.CppClassPtrParameter-class.html#__init__,Method pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.__init__()=pybindgen.cppclass_typehandlers.CppClassPtrReturnValue-class.html#__init__,Method pybindgen.cppclass_typehandlers.CppClassRefParameter.__init__()=pybindgen.cppclass_typehandlers.CppClassRefParameter-class.html#__init__,Method pybindgen.cppclass_typehandlers.CppClassReturnValue.__init__()=pybindgen.cppclass_typehandlers.CppClassReturnValue-class.html#__init__,Method pybindgen.cppclass_typehandlers.CppClassReturnValueBase.__init__()=pybindgen.cppclass_typehandlers.CppClassReturnValueBase-class.html#__init__,Method pybindgen.cppmethod.CppConstructor.__init__()=pybindgen.cppmethod.CppConstructor-class.html#__init__,Method pybindgen.cppmethod.CppDummyMethod.__init__()=pybindgen.cppmethod.CppDummyMethod-class.html#__init__,Method pybindgen.cppmethod.CppFunctionAsConstructor.__init__()=pybindgen.cppmethod.CppFunctionAsConstructor-class.html#__init__,Method pybindgen.cppmethod.CppMethod.__init__()=pybindgen.cppmethod.CppMethod-class.html#__init__,Method pybindgen.cppmethod.CppNoConstructor.__init__()=pybindgen.cppmethod.CppNoConstructor-class.html#__init__,Method pybindgen.cppmethod.CppVirtualMethodParentCaller.__init__()=pybindgen.cppmethod.CppVirtualMethodParentCaller-class.html#__init__,Method pybindgen.cppmethod.CppVirtualMethodProxy.__init__()=pybindgen.cppmethod.CppVirtualMethodProxy-class.html#__init__,Method pybindgen.cppmethod.CustomCppConstructorWrapper.__init__()=pybindgen.cppmethod.CustomCppConstructorWrapper-class.html#__init__,Method pybindgen.cppmethod.CustomCppMethodWrapper.__init__()=pybindgen.cppmethod.CustomCppMethodWrapper-class.html#__init__,Method pybindgen.cppmethod.DummyParameter.__init__()=pybindgen.cppmethod.DummyParameter-class.html#__init__,Method pybindgen.cppmethod.DummyReturnValue.__init__()=pybindgen.cppmethod.DummyReturnValue-class.html#__init__,Method pybindgen.enum.Enum.__init__()=pybindgen.enum.Enum-class.html#__init__,Method pybindgen.function.CustomFunctionWrapper.__init__()=pybindgen.function.CustomFunctionWrapper-class.html#__init__,Method pybindgen.function.Function.__init__()=pybindgen.function.Function-class.html#__init__,Method pybindgen.gccxmlparser.AnnotationsScanner.__init__()=pybindgen.gccxmlparser.AnnotationsScanner-class.html#__init__,Method pybindgen.gccxmlparser.GccXmlTypeRegistry.__init__()=pybindgen.gccxmlparser.GccXmlTypeRegistry-class.html#__init__,Method pybindgen.gccxmlparser.ModuleParser.__init__()=pybindgen.gccxmlparser.ModuleParser-class.html#__init__,Method pybindgen.gccxmlparser.PygenSection.__init__()=pybindgen.gccxmlparser.PygenSection-class.html#__init__,Method pybindgen.module.Module.__init__()=pybindgen.module.Module-class.html#__init__,Method pybindgen.module.ModuleBase.__init__()=pybindgen.module.ModuleBase-class.html#__init__,Method pybindgen.module.SubModule.__init__()=pybindgen.module.SubModule-class.html#__init__,Method pybindgen.overloading.OverloadedWrapper.__init__()=pybindgen.overloading.OverloadedWrapper-class.html#__init__,Method pybindgen.pytypeobject.PyNumberMethods.__init__()=pybindgen.pytypeobject.PyNumberMethods-class.html#__init__,Method pybindgen.pytypeobject.PySequenceMethods.__init__()=pybindgen.pytypeobject.PySequenceMethods-class.html#__init__,Method pybindgen.pytypeobject.PyTypeObject.__init__()=pybindgen.pytypeobject.PyTypeObject-class.html#__init__,Method pybindgen.typehandlers.base.BuildValueParameters.__init__()=pybindgen.typehandlers.base.BuildValueParameters-class.html#__init__,Method pybindgen.typehandlers.base.CodeBlock.CleanupHandle.__init__()=pybindgen.typehandlers.base.CodeBlock.CleanupHandle-class.html#__init__,Method pybindgen.typehandlers.base.CodeBlock.__init__()=pybindgen.typehandlers.base.CodeBlock-class.html#__init__,Method pybindgen.typehandlers.base.DeclarationsScope.__init__()=pybindgen.typehandlers.base.DeclarationsScope-class.html#__init__,Method pybindgen.typehandlers.base.ForwardWrapperBase.__init__()=pybindgen.typehandlers.base.ForwardWrapperBase-class.html#__init__,Method pybindgen.typehandlers.base.Parameter.__init__()=pybindgen.typehandlers.base.Parameter-class.html#__init__,Method pybindgen.typehandlers.base.Parameter.__metaclass__.__init__()=pybindgen.typehandlers.base.Parameter.__metaclass__-class.html#__init__,Method pybindgen.typehandlers.base.ParseTupleParameters.__init__()=pybindgen.typehandlers.base.ParseTupleParameters-class.html#__init__,Method pybindgen.typehandlers.base.PointerParameter.__init__()=pybindgen.typehandlers.base.PointerParameter-class.html#__init__,Method pybindgen.typehandlers.base.PointerReturnValue.__init__()=pybindgen.typehandlers.base.PointerReturnValue-class.html#__init__,Method pybindgen.typehandlers.base.ReturnValue.__init__()=pybindgen.typehandlers.base.ReturnValue-class.html#__init__,Method pybindgen.typehandlers.base.ReturnValue.__metaclass__.__init__()=pybindgen.typehandlers.base.ReturnValue.__metaclass__-class.html#__init__,Method pybindgen.typehandlers.base.ReverseWrapperBase.__init__()=pybindgen.typehandlers.base.ReverseWrapperBase-class.html#__init__,Method pybindgen.typehandlers.base.TypeHandler.__init__()=pybindgen.typehandlers.base.TypeHandler-class.html#__init__,Method pybindgen.typehandlers.base.TypeMatcher.__init__()=pybindgen.typehandlers.base.TypeMatcher-class.html#__init__,Method pybindgen.typehandlers.codesink.CodeSink.__init__()=pybindgen.typehandlers.codesink.CodeSink-class.html#__init__,Method pybindgen.typehandlers.codesink.FileCodeSink.__init__()=pybindgen.typehandlers.codesink.FileCodeSink-class.html#__init__,Method pybindgen.typehandlers.codesink.MemoryCodeSink.__init__()=pybindgen.typehandlers.codesink.MemoryCodeSink-class.html#__init__,Method pybindgen.typehandlers.codesink.NullCodeSink.__init__()=pybindgen.typehandlers.codesink.NullCodeSink-class.html#__init__,Method pybindgen.typehandlers.ctypeparser.CType.__init__()=pybindgen.typehandlers.ctypeparser.CType-class.html#__init__,Method pybindgen.typehandlers.ctypeparser.TypeTraits.__init__()=pybindgen.typehandlers.ctypeparser.TypeTraits-class.html#__init__,Method pybindgen.typehandlers.ctypeparser.tokenizer.Token.__init__()=pybindgen.typehandlers.ctypeparser.tokenizer.Token-class.html#__init__,Method pybindgen.typehandlers.floattype.FloatPtrParam.__init__()=pybindgen.typehandlers.floattype.FloatPtrParam-class.html#__init__,Method pybindgen.typehandlers.inttype.Int8PtrParam.__init__()=pybindgen.typehandlers.inttype.Int8PtrParam-class.html#__init__,Method pybindgen.typehandlers.inttype.IntPtrParam.__init__()=pybindgen.typehandlers.inttype.IntPtrParam-class.html#__init__,Method pybindgen.typehandlers.inttype.UInt8PtrParam.__init__()=pybindgen.typehandlers.inttype.UInt8PtrParam-class.html#__init__,Method pybindgen.typehandlers.inttype.UnsignedIntPtrParam.__init__()=pybindgen.typehandlers.inttype.UnsignedIntPtrParam-class.html#__init__,Method pybindgen.typehandlers.pyobjecttype.PyObjectParam.__init__()=pybindgen.typehandlers.pyobjecttype.PyObjectParam-class.html#__init__,Method pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.__init__()=pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue-class.html#__init__,Method pybindgen.wrapper_registry.NullWrapperRegistry.__init__()=pybindgen.wrapper_registry.NullWrapperRegistry-class.html#__init__,Method pybindgen.wrapper_registry.StdMapWrapperRegistry.__init__()=pybindgen.wrapper_registry.StdMapWrapperRegistry-class.html#__init__,Method pybindgen.wrapper_registry.WrapperRegistry.__init__()=pybindgen.wrapper_registry.WrapperRegistry-class.html#__init__"><a title="pybindgen.container.Container.__init__
pybindgen.container.ContainerParameterBase.__init__
pybindgen.container.ContainerPtrParameter.__init__
pybindgen.container.ContainerReturnValue.__init__
pybindgen.container.ContainerReturnValueBase.__init__
pybindgen.container.ContainerTraits.__init__
pybindgen.container.IterNextWrapper.__init__
pybindgen.converter_functions.CToPythonConverter.__init__
pybindgen.converter_functions.PythonToCConverter.__init__
pybindgen.cppattribute.CppInstanceAttributeGetter.__init__
pybindgen.cppattribute.CppInstanceAttributeSetter.__init__
pybindgen.cppattribute.CppStaticAttributeGetter.__init__
pybindgen.cppattribute.CppStaticAttributeSetter.__init__
pybindgen.cppattribute.PyGetSetDef.__init__
pybindgen.cppattribute.PyMetaclass.__init__
pybindgen.cppclass.CppClass.__init__
pybindgen.cppclass.CppHelperClass.__init__
pybindgen.cppclass.FreeFunctionPolicy.__init__
pybindgen.cppclass.MemoryPolicy.__init__
pybindgen.cppclass.ReferenceCountingFunctionsPolicy.__init__
pybindgen.cppclass.ReferenceCountingMethodsPolicy.__init__
pybindgen.cppclass_typehandlers.CppClassParameterBase.__init__
pybindgen.cppclass_typehandlers.CppClassPtrParameter.__init__
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.__init__
pybindgen.cppclass_typehandlers.CppClassRefParameter.__init__
pybindgen.cppclass_typehandlers.CppClassReturnValue.__init__
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.__init__
pybindgen.cppmethod.CppConstructor.__init__
pybindgen.cppmethod.CppDummyMethod.__init__
pybindgen.cppmethod.CppFunctionAsConstructor.__init__
pybindgen.cppmethod.CppMethod.__init__
pybindgen.cppmethod.CppNoConstructor.__init__
pybindgen.cppmethod.CppVirtualMethodParentCaller.__init__
pybindgen.cppmethod.CppVirtualMethodProxy.__init__
pybindgen.cppmethod.CustomCppConstructorWrapper.__init__
pybindgen.cppmethod.CustomCppMethodWrapper.__init__
pybindgen.cppmethod.DummyParameter.__init__
pybindgen.cppmethod.DummyReturnValue.__init__
pybindgen.enum.Enum.__init__
pybindgen.function.CustomFunctionWrapper.__init__
pybindgen.function.Function.__init__
pybindgen.gccxmlparser.AnnotationsScanner.__init__
pybindgen.gccxmlparser.GccXmlTypeRegistry.__init__
pybindgen.gccxmlparser.ModuleParser.__init__
pybindgen.gccxmlparser.PygenSection.__init__
pybindgen.module.Module.__init__
pybindgen.module.ModuleBase.__init__
pybindgen.module.SubModule.__init__
pybindgen.overloading.OverloadedWrapper.__init__
pybindgen.pytypeobject.PyNumberMethods.__init__
pybindgen.pytypeobject.PySequenceMethods.__init__
pybindgen.pytypeobject.PyTypeObject.__init__
pybindgen.typehandlers.base.BuildValueParameters.__init__
pybindgen.typehandlers.base.CodeBlock.CleanupHandle.__init__
pybindgen.typehandlers.base.CodeBlock.__init__
pybindgen.typehandlers.base.DeclarationsScope.__init__
pybindgen.typehandlers.base.ForwardWrapperBase.__init__
pybindgen.typehandlers.base.Parameter.__init__
pybindgen.typehandlers.base.Parameter.__metaclass__.__init__
pybindgen.typehandlers.base.ParseTupleParameters.__init__
pybindgen.typehandlers.base.PointerParameter.__init__
pybindgen.typehandlers.base.PointerReturnValue.__init__
pybindgen.typehandlers.base.ReturnValue.__init__
pybindgen.typehandlers.base.ReturnValue.__metaclass__.__init__
pybindgen.typehandlers.base.ReverseWrapperBase.__init__
pybindgen.typehandlers.base.TypeHandler.__init__
pybindgen.typehandlers.base.TypeMatcher.__init__
pybindgen.typehandlers.codesink.CodeSink.__init__
pybindgen.typehandlers.codesink.FileCodeSink.__init__
pybindgen.typehandlers.codesink.MemoryCodeSink.__init__
pybindgen.typehandlers.codesink.NullCodeSink.__init__
pybindgen.typehandlers.ctypeparser.CType.__init__
pybindgen.typehandlers.ctypeparser.TypeTraits.__init__
pybindgen.typehandlers.ctypeparser.tokenizer.Token.__init__
pybindgen.typehandlers.floattype.FloatPtrParam.__init__
pybindgen.typehandlers.inttype.Int8PtrParam.__init__
pybindgen.typehandlers.inttype.IntPtrParam.__init__
pybindgen.typehandlers.inttype.UInt8PtrParam.__init__
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.__init__
pybindgen.typehandlers.pyobjecttype.PyObjectParam.__init__
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.__init__
pybindgen.wrapper_registry.NullWrapperRegistry.__init__
pybindgen.wrapper_registry.StdMapWrapperRegistry.__init__
pybindgen.wrapper_registry.WrapperRegistry.__init__" class="py-name" href="#" onclick="return doclink('link-224', '__init__', 'link-224');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">mcs</tt><tt class="py-op">,</tt> <tt id="link-225" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-225', 'name', 'link-4');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">bases</tt><tt class="py-op">,</tt> <tt class="py-name">dict_</tt><tt class="py-op">)</tt> </tt>
<a name="L1098"></a><tt class="py-lineno">1098</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L1099"></a><tt class="py-lineno">1099</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1100"></a><tt class="py-lineno">1100</tt>  <tt class="py-line">                    <tt class="py-name">iter</tt><tt class="py-op">(</tt><tt class="py-name">mcs</tt><tt class="py-op">.</tt><tt id="link-226" class="py-name"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-226', 'CTYPES', 'link-221');">CTYPES</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1101"></a><tt class="py-lineno">1101</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">TypeError</tt><tt class="py-op">:</tt> </tt>
<a name="L1102"></a><tt class="py-lineno">1102</tt>  <tt class="py-line">                    <tt class="py-keyword">print</tt> <tt class="py-string">"ERROR: missing CTYPES on class "</tt><tt class="py-op">,</tt> <tt class="py-name">mcs</tt> </tt>
<a name="L1103"></a><tt class="py-lineno">1103</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">ctype</tt> <tt class="py-keyword">in</tt> <tt class="py-name">mcs</tt><tt class="py-op">.</tt><tt id="link-227" class="py-name"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-227', 'CTYPES', 'link-221');">CTYPES</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1104"></a><tt class="py-lineno">1104</tt>  <tt class="py-line">                <tt id="link-228" class="py-name" targets="Variable pybindgen.typehandlers.base.return_type_matcher=pybindgen.typehandlers.base-module.html#return_type_matcher"><a title="pybindgen.typehandlers.base.return_type_matcher" class="py-name" href="#" onclick="return doclink('link-228', 'return_type_matcher', 'link-228');">return_type_matcher</a></tt><tt class="py-op">.</tt><tt id="link-229" class="py-name" targets="Method pybindgen.typehandlers.base.TypeMatcher.register()=pybindgen.typehandlers.base.TypeMatcher-class.html#register"><a title="pybindgen.typehandlers.base.TypeMatcher.register" class="py-name" href="#" onclick="return doclink('link-229', 'register', 'link-229');">register</a></tt><tt class="py-op">(</tt><tt class="py-name">ctype</tt><tt class="py-op">,</tt> <tt class="py-name">mcs</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1105"></a><tt class="py-lineno">1105</tt>  <tt class="py-line"> </tt>
<a name="L1106"></a><tt class="py-lineno">1106</tt>  <tt class="py-line">    <tt class="py-comment">#@classmethod</tt> </tt>
<a name="ReturnValue.new"></a><div id="ReturnValue.new-def"><a name="L1107"></a><tt class="py-lineno">1107</tt> <a class="py-toggle" href="#" id="ReturnValue.new-toggle" onclick="return toggle('ReturnValue.new');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ReturnValue-class.html#new">new</a><tt class="py-op">(</tt><tt class="py-param">cls</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReturnValue.new-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReturnValue.new-expanded"><a name="L1108"></a><tt class="py-lineno">1108</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1109"></a><tt class="py-lineno">1109</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; import inttype</tt> </tt>
<a name="L1110"></a><tt class="py-lineno">1110</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; isinstance(ReturnValue.new('int'), inttype.IntReturn)</tt> </tt>
<a name="L1111"></a><tt class="py-lineno">1111</tt>  <tt class="py-line"><tt class="py-docstring">        True</tt> </tt>
<a name="L1112"></a><tt class="py-lineno">1112</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1113"></a><tt class="py-lineno">1113</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">cls</tt> <tt class="py-keyword">is</tt> <tt id="link-230" class="py-name"><a title="pybindgen.typehandlers.base.ReturnValue" class="py-name" href="#" onclick="return doclink('link-230', 'ReturnValue', 'link-128');">ReturnValue</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1114"></a><tt class="py-lineno">1114</tt>  <tt class="py-line">            <tt class="py-name">ctype</tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1115"></a><tt class="py-lineno">1115</tt>  <tt class="py-line">            <tt class="py-name">type_handler_class</tt><tt class="py-op">,</tt> <tt class="py-name">transformation</tt><tt class="py-op">,</tt> <tt class="py-name">type_traits</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L1116"></a><tt class="py-lineno">1116</tt>  <tt class="py-line">                <tt id="link-231" class="py-name"><a title="pybindgen.typehandlers.base.return_type_matcher" class="py-name" href="#" onclick="return doclink('link-231', 'return_type_matcher', 'link-228');">return_type_matcher</a></tt><tt class="py-op">.</tt><tt id="link-232" class="py-name" targets="Method pybindgen.typehandlers.base.TypeMatcher.lookup()=pybindgen.typehandlers.base.TypeMatcher-class.html#lookup"><a title="pybindgen.typehandlers.base.TypeMatcher.lookup" class="py-name" href="#" onclick="return doclink('link-232', 'lookup', 'link-232');">lookup</a></tt><tt class="py-op">(</tt><tt class="py-name">ctype</tt><tt class="py-op">)</tt> </tt>
<a name="L1117"></a><tt class="py-lineno">1117</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt class="py-name">type_handler_class</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt> </tt>
<a name="L1118"></a><tt class="py-lineno">1118</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">transformation</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1119"></a><tt class="py-lineno">1119</tt>  <tt class="py-line">                <tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> </tt>
<a name="L1120"></a><tt class="py-lineno">1120</tt>  <tt class="py-line">                <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">type_traits</tt> </tt>
<a name="L1121"></a><tt class="py-lineno">1121</tt>  <tt class="py-line">                <tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-name">tuple</tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> </tt>
<a name="L1122"></a><tt class="py-lineno">1122</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1123"></a><tt class="py-lineno">1123</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">type_handler_class</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
<a name="L1124"></a><tt class="py-lineno">1124</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">TypeError</tt><tt class="py-op">,</tt> <tt class="py-name">ex</tt><tt class="py-op">:</tt> </tt>
<a name="L1125"></a><tt class="py-lineno">1125</tt>  <tt class="py-line">                    <tt class="py-name">warnings</tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">"Exception %r in type handler %s constructor"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">ex</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">type_handler_class</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1126"></a><tt class="py-lineno">1126</tt>  <tt class="py-line">                    <tt class="py-keyword">raise</tt> </tt>
<a name="L1127"></a><tt class="py-lineno">1127</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1128"></a><tt class="py-lineno">1128</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">transformation</tt><tt class="py-op">.</tt><tt id="link-233" class="py-name" targets="Method pybindgen.typehandlers.base.NullTypeTransformation.create_type_handler()=pybindgen.typehandlers.base.NullTypeTransformation-class.html#create_type_handler,Method pybindgen.typehandlers.base.TypeTransformation.create_type_handler()=pybindgen.typehandlers.base.TypeTransformation-class.html#create_type_handler"><a title="pybindgen.typehandlers.base.NullTypeTransformation.create_type_handler
pybindgen.typehandlers.base.TypeTransformation.create_type_handler" class="py-name" href="#" onclick="return doclink('link-233', 'create_type_handler', 'link-233');">create_type_handler</a></tt><tt class="py-op">(</tt><tt class="py-name">type_handler_class</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
<a name="L1129"></a><tt class="py-lineno">1129</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1130"></a><tt class="py-lineno">1130</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">cls</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1131"></a><tt class="py-lineno">1131</tt>  <tt class="py-line"> </tt>
<a name="L1132"></a><tt class="py-lineno">1132</tt>  <tt class="py-line">    <tt id="link-234" class="py-name" targets="Class Method pybindgen.typehandlers.base.Parameter.new()=pybindgen.typehandlers.base.Parameter-class.html#new,Class Method pybindgen.typehandlers.base.ReturnValue.new()=pybindgen.typehandlers.base.ReturnValue-class.html#new"><a title="pybindgen.typehandlers.base.Parameter.new
pybindgen.typehandlers.base.ReturnValue.new" class="py-name" href="#" onclick="return doclink('link-234', 'new', 'link-234');">new</a></tt> <tt class="py-op">=</tt> <tt class="py-name">classmethod</tt><tt class="py-op">(</tt><tt id="link-235" class="py-name"><a title="pybindgen.typehandlers.base.Parameter.new
pybindgen.typehandlers.base.ReturnValue.new" class="py-name" href="#" onclick="return doclink('link-235', 'new', 'link-234');">new</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1133"></a><tt class="py-lineno">1133</tt>  <tt class="py-line"> </tt>
<a name="ReturnValue.__init__"></a><div id="ReturnValue.__init__-def"><a name="L1134"></a><tt class="py-lineno">1134</tt> <a class="py-toggle" href="#" id="ReturnValue.__init__-toggle" onclick="return toggle('ReturnValue.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ReturnValue-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">ctype</tt><tt class="py-op">,</tt> <tt class="py-param">is_const</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReturnValue.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReturnValue.__init__-expanded"><a name="L1135"></a><tt class="py-lineno">1135</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L1136"></a><tt class="py-lineno">1136</tt>  <tt class="py-line"><tt class="py-docstring">        Creates a return value object</tt> </tt>
<a name="L1137"></a><tt class="py-lineno">1137</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1138"></a><tt class="py-lineno">1138</tt>  <tt class="py-line"><tt class="py-docstring">        Keywork Arguments:</tt> </tt>
<a name="L1139"></a><tt class="py-lineno">1139</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1140"></a><tt class="py-lineno">1140</tt>  <tt class="py-line"><tt class="py-docstring">        @param ctype: actual C/C++ type being used</tt> </tt>
<a name="L1141"></a><tt class="py-lineno">1141</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L1142"></a><tt class="py-lineno">1142</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt id="link-236" class="py-name"><a title="pybindgen.typehandlers.base.ReturnValue" class="py-name" href="#" onclick="return doclink('link-236', 'ReturnValue', 'link-128');">ReturnValue</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1143"></a><tt class="py-lineno">1143</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt><tt class="py-op">(</tt><tt class="py-string">'ReturnValue is an abstract class; use ReturnValue.new(...)'</tt><tt class="py-op">)</tt> </tt>
<a name="L1144"></a><tt class="py-lineno">1144</tt>  <tt class="py-line">        <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-237" class="py-name"><a title="pybindgen.typehandlers.base.ReturnValue" class="py-name" href="#" onclick="return doclink('link-237', 'ReturnValue', 'link-128');">ReturnValue</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-238" class="py-name"><a title="pybindgen.container.Container.__init__
pybindgen.container.ContainerParameterBase.__init__
pybindgen.container.ContainerPtrParameter.__init__
pybindgen.container.ContainerReturnValue.__init__
pybindgen.container.ContainerReturnValueBase.__init__
pybindgen.container.ContainerTraits.__init__
pybindgen.container.IterNextWrapper.__init__
pybindgen.converter_functions.CToPythonConverter.__init__
pybindgen.converter_functions.PythonToCConverter.__init__
pybindgen.cppattribute.CppInstanceAttributeGetter.__init__
pybindgen.cppattribute.CppInstanceAttributeSetter.__init__
pybindgen.cppattribute.CppStaticAttributeGetter.__init__
pybindgen.cppattribute.CppStaticAttributeSetter.__init__
pybindgen.cppattribute.PyGetSetDef.__init__
pybindgen.cppattribute.PyMetaclass.__init__
pybindgen.cppclass.CppClass.__init__
pybindgen.cppclass.CppHelperClass.__init__
pybindgen.cppclass.FreeFunctionPolicy.__init__
pybindgen.cppclass.MemoryPolicy.__init__
pybindgen.cppclass.ReferenceCountingFunctionsPolicy.__init__
pybindgen.cppclass.ReferenceCountingMethodsPolicy.__init__
pybindgen.cppclass_typehandlers.CppClassParameterBase.__init__
pybindgen.cppclass_typehandlers.CppClassPtrParameter.__init__
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.__init__
pybindgen.cppclass_typehandlers.CppClassRefParameter.__init__
pybindgen.cppclass_typehandlers.CppClassReturnValue.__init__
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.__init__
pybindgen.cppmethod.CppConstructor.__init__
pybindgen.cppmethod.CppDummyMethod.__init__
pybindgen.cppmethod.CppFunctionAsConstructor.__init__
pybindgen.cppmethod.CppMethod.__init__
pybindgen.cppmethod.CppNoConstructor.__init__
pybindgen.cppmethod.CppVirtualMethodParentCaller.__init__
pybindgen.cppmethod.CppVirtualMethodProxy.__init__
pybindgen.cppmethod.CustomCppConstructorWrapper.__init__
pybindgen.cppmethod.CustomCppMethodWrapper.__init__
pybindgen.cppmethod.DummyParameter.__init__
pybindgen.cppmethod.DummyReturnValue.__init__
pybindgen.enum.Enum.__init__
pybindgen.function.CustomFunctionWrapper.__init__
pybindgen.function.Function.__init__
pybindgen.gccxmlparser.AnnotationsScanner.__init__
pybindgen.gccxmlparser.GccXmlTypeRegistry.__init__
pybindgen.gccxmlparser.ModuleParser.__init__
pybindgen.gccxmlparser.PygenSection.__init__
pybindgen.module.Module.__init__
pybindgen.module.ModuleBase.__init__
pybindgen.module.SubModule.__init__
pybindgen.overloading.OverloadedWrapper.__init__
pybindgen.pytypeobject.PyNumberMethods.__init__
pybindgen.pytypeobject.PySequenceMethods.__init__
pybindgen.pytypeobject.PyTypeObject.__init__
pybindgen.typehandlers.base.BuildValueParameters.__init__
pybindgen.typehandlers.base.CodeBlock.CleanupHandle.__init__
pybindgen.typehandlers.base.CodeBlock.__init__
pybindgen.typehandlers.base.DeclarationsScope.__init__
pybindgen.typehandlers.base.ForwardWrapperBase.__init__
pybindgen.typehandlers.base.Parameter.__init__
pybindgen.typehandlers.base.Parameter.__metaclass__.__init__
pybindgen.typehandlers.base.ParseTupleParameters.__init__
pybindgen.typehandlers.base.PointerParameter.__init__
pybindgen.typehandlers.base.PointerReturnValue.__init__
pybindgen.typehandlers.base.ReturnValue.__init__
pybindgen.typehandlers.base.ReturnValue.__metaclass__.__init__
pybindgen.typehandlers.base.ReverseWrapperBase.__init__
pybindgen.typehandlers.base.TypeHandler.__init__
pybindgen.typehandlers.base.TypeMatcher.__init__
pybindgen.typehandlers.codesink.CodeSink.__init__
pybindgen.typehandlers.codesink.FileCodeSink.__init__
pybindgen.typehandlers.codesink.MemoryCodeSink.__init__
pybindgen.typehandlers.codesink.NullCodeSink.__init__
pybindgen.typehandlers.ctypeparser.CType.__init__
pybindgen.typehandlers.ctypeparser.TypeTraits.__init__
pybindgen.typehandlers.ctypeparser.tokenizer.Token.__init__
pybindgen.typehandlers.floattype.FloatPtrParam.__init__
pybindgen.typehandlers.inttype.Int8PtrParam.__init__
pybindgen.typehandlers.inttype.IntPtrParam.__init__
pybindgen.typehandlers.inttype.UInt8PtrParam.__init__
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.__init__
pybindgen.typehandlers.pyobjecttype.PyObjectParam.__init__
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.__init__
pybindgen.wrapper_registry.NullWrapperRegistry.__init__
pybindgen.wrapper_registry.StdMapWrapperRegistry.__init__
pybindgen.wrapper_registry.WrapperRegistry.__init__" class="py-name" href="#" onclick="return doclink('link-238', '__init__', 'link-224');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">ctype</tt><tt class="py-op">,</tt> <tt class="py-name">is_const</tt><tt class="py-op">)</tt> </tt>
<a name="L1145"></a><tt class="py-lineno">1145</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-string">'retval'</tt> </tt>
</div><a name="L1146"></a><tt class="py-lineno">1146</tt>  <tt class="py-line"> </tt>
<a name="ReturnValue.get_c_error_return"></a><div id="ReturnValue.get_c_error_return-def"><a name="L1147"></a><tt class="py-lineno">1147</tt> <a class="py-toggle" href="#" id="ReturnValue.get_c_error_return-toggle" onclick="return toggle('ReturnValue.get_c_error_return');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ReturnValue-class.html#get_c_error_return">get_c_error_return</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReturnValue.get_c_error_return-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReturnValue.get_c_error_return-expanded"><a name="L1148"></a><tt class="py-lineno">1148</tt>  <tt class="py-line">        <tt class="py-docstring">'''Return a "return &lt;value&gt;" code string, for use in case of error'''</tt> </tt>
<a name="L1149"></a><tt class="py-lineno">1149</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt> </tt>
</div><a name="L1150"></a><tt class="py-lineno">1150</tt>  <tt class="py-line"> </tt>
<a name="ReturnValue.convert_python_to_c"></a><div id="ReturnValue.convert_python_to_c-def"><a name="L1151"></a><tt class="py-lineno">1151</tt> <a class="py-toggle" href="#" id="ReturnValue.convert_python_to_c-toggle" onclick="return toggle('ReturnValue.convert_python_to_c');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ReturnValue-class.html#convert_python_to_c">convert_python_to_c</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">wrapper</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReturnValue.convert_python_to_c-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReturnValue.convert_python_to_c-expanded"><a name="L1152"></a><tt class="py-lineno">1152</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L1153"></a><tt class="py-lineno">1153</tt>  <tt class="py-line"><tt class="py-docstring">        Writes code to convert the Python return value into the C "retval" variable.</tt> </tt>
<a name="L1154"></a><tt class="py-lineno">1154</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L1155"></a><tt class="py-lineno">1155</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt> </tt>
</div><a name="L1156"></a><tt class="py-lineno">1156</tt>  <tt class="py-line">        <tt class="py-comment">#assert isinstance(wrapper, ReverseWrapperBase)</tt> </tt>
<a name="L1157"></a><tt class="py-lineno">1157</tt>  <tt class="py-line"> </tt>
<a name="ReturnValue.convert_c_to_python"></a><div id="ReturnValue.convert_c_to_python-def"><a name="L1158"></a><tt class="py-lineno">1158</tt> <a class="py-toggle" href="#" id="ReturnValue.convert_c_to_python-toggle" onclick="return toggle('ReturnValue.convert_c_to_python');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.ReturnValue-class.html#convert_c_to_python">convert_c_to_python</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">wrapper</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReturnValue.convert_c_to_python-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReturnValue.convert_c_to_python-expanded"><a name="L1159"></a><tt class="py-lineno">1159</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L1160"></a><tt class="py-lineno">1160</tt>  <tt class="py-line"><tt class="py-docstring">        Writes code to convert the C return value the Python return.</tt> </tt>
<a name="L1161"></a><tt class="py-lineno">1161</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L1162"></a><tt class="py-lineno">1162</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt> </tt>
</div></div><a name="L1163"></a><tt class="py-lineno">1163</tt>  <tt class="py-line">        <tt class="py-comment">#assert isinstance(wrapper, ReverseWrapperBase)</tt> </tt>
<a name="L1164"></a><tt class="py-lineno">1164</tt>  <tt class="py-line"> </tt>
<a name="L1165"></a><tt class="py-lineno">1165</tt>  <tt class="py-line"><tt id="link-239" class="py-name"><a title="pybindgen.typehandlers.base.ReturnValue" class="py-name" href="#" onclick="return doclink('link-239', 'ReturnValue', 'link-128');">ReturnValue</a></tt><tt class="py-op">.</tt><tt id="link-240" class="py-name"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-240', 'CTYPES', 'link-221');">CTYPES</a></tt> <tt class="py-op">=</tt> <tt class="py-name">NotImplemented</tt> </tt>
<a name="L1166"></a><tt class="py-lineno">1166</tt>  <tt class="py-line"> </tt>
<a name="PointerReturnValue"></a><div id="PointerReturnValue-def"><a name="L1167"></a><tt class="py-lineno">1167</tt> <a class="py-toggle" href="#" id="PointerReturnValue-toggle" onclick="return toggle('PointerReturnValue');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.PointerReturnValue-class.html">PointerReturnValue</a><tt class="py-op">(</tt><tt class="py-base-class">ReturnValue</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="PointerReturnValue-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="PointerReturnValue-expanded"><a name="L1168"></a><tt class="py-lineno">1168</tt>  <tt class="py-line">    <tt class="py-docstring">"""Base class for all pointer-to-something handlers"""</tt> </tt>
<a name="L1169"></a><tt class="py-lineno">1169</tt>  <tt class="py-line">    <tt id="link-241" class="py-name"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-241', 'CTYPES', 'link-221');">CTYPES</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="PointerReturnValue.__init__"></a><div id="PointerReturnValue.__init__-def"><a name="L1170"></a><tt class="py-lineno">1170</tt> <a class="py-toggle" href="#" id="PointerReturnValue.__init__-toggle" onclick="return toggle('PointerReturnValue.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.PointerReturnValue-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">ctype</tt><tt class="py-op">,</tt> <tt class="py-param">is_const</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-param">caller_owns_return</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="PointerReturnValue.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="PointerReturnValue.__init__-expanded"><a name="L1171"></a><tt class="py-lineno">1171</tt>  <tt class="py-line">        <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-242" class="py-name" targets="Class pybindgen.typehandlers.base.PointerReturnValue=pybindgen.typehandlers.base.PointerReturnValue-class.html"><a title="pybindgen.typehandlers.base.PointerReturnValue" class="py-name" href="#" onclick="return doclink('link-242', 'PointerReturnValue', 'link-242');">PointerReturnValue</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-243" class="py-name"><a title="pybindgen.container.Container.__init__
pybindgen.container.ContainerParameterBase.__init__
pybindgen.container.ContainerPtrParameter.__init__
pybindgen.container.ContainerReturnValue.__init__
pybindgen.container.ContainerReturnValueBase.__init__
pybindgen.container.ContainerTraits.__init__
pybindgen.container.IterNextWrapper.__init__
pybindgen.converter_functions.CToPythonConverter.__init__
pybindgen.converter_functions.PythonToCConverter.__init__
pybindgen.cppattribute.CppInstanceAttributeGetter.__init__
pybindgen.cppattribute.CppInstanceAttributeSetter.__init__
pybindgen.cppattribute.CppStaticAttributeGetter.__init__
pybindgen.cppattribute.CppStaticAttributeSetter.__init__
pybindgen.cppattribute.PyGetSetDef.__init__
pybindgen.cppattribute.PyMetaclass.__init__
pybindgen.cppclass.CppClass.__init__
pybindgen.cppclass.CppHelperClass.__init__
pybindgen.cppclass.FreeFunctionPolicy.__init__
pybindgen.cppclass.MemoryPolicy.__init__
pybindgen.cppclass.ReferenceCountingFunctionsPolicy.__init__
pybindgen.cppclass.ReferenceCountingMethodsPolicy.__init__
pybindgen.cppclass_typehandlers.CppClassParameterBase.__init__
pybindgen.cppclass_typehandlers.CppClassPtrParameter.__init__
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.__init__
pybindgen.cppclass_typehandlers.CppClassRefParameter.__init__
pybindgen.cppclass_typehandlers.CppClassReturnValue.__init__
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.__init__
pybindgen.cppmethod.CppConstructor.__init__
pybindgen.cppmethod.CppDummyMethod.__init__
pybindgen.cppmethod.CppFunctionAsConstructor.__init__
pybindgen.cppmethod.CppMethod.__init__
pybindgen.cppmethod.CppNoConstructor.__init__
pybindgen.cppmethod.CppVirtualMethodParentCaller.__init__
pybindgen.cppmethod.CppVirtualMethodProxy.__init__
pybindgen.cppmethod.CustomCppConstructorWrapper.__init__
pybindgen.cppmethod.CustomCppMethodWrapper.__init__
pybindgen.cppmethod.DummyParameter.__init__
pybindgen.cppmethod.DummyReturnValue.__init__
pybindgen.enum.Enum.__init__
pybindgen.function.CustomFunctionWrapper.__init__
pybindgen.function.Function.__init__
pybindgen.gccxmlparser.AnnotationsScanner.__init__
pybindgen.gccxmlparser.GccXmlTypeRegistry.__init__
pybindgen.gccxmlparser.ModuleParser.__init__
pybindgen.gccxmlparser.PygenSection.__init__
pybindgen.module.Module.__init__
pybindgen.module.ModuleBase.__init__
pybindgen.module.SubModule.__init__
pybindgen.overloading.OverloadedWrapper.__init__
pybindgen.pytypeobject.PyNumberMethods.__init__
pybindgen.pytypeobject.PySequenceMethods.__init__
pybindgen.pytypeobject.PyTypeObject.__init__
pybindgen.typehandlers.base.BuildValueParameters.__init__
pybindgen.typehandlers.base.CodeBlock.CleanupHandle.__init__
pybindgen.typehandlers.base.CodeBlock.__init__
pybindgen.typehandlers.base.DeclarationsScope.__init__
pybindgen.typehandlers.base.ForwardWrapperBase.__init__
pybindgen.typehandlers.base.Parameter.__init__
pybindgen.typehandlers.base.Parameter.__metaclass__.__init__
pybindgen.typehandlers.base.ParseTupleParameters.__init__
pybindgen.typehandlers.base.PointerParameter.__init__
pybindgen.typehandlers.base.PointerReturnValue.__init__
pybindgen.typehandlers.base.ReturnValue.__init__
pybindgen.typehandlers.base.ReturnValue.__metaclass__.__init__
pybindgen.typehandlers.base.ReverseWrapperBase.__init__
pybindgen.typehandlers.base.TypeHandler.__init__
pybindgen.typehandlers.base.TypeMatcher.__init__
pybindgen.typehandlers.codesink.CodeSink.__init__
pybindgen.typehandlers.codesink.FileCodeSink.__init__
pybindgen.typehandlers.codesink.MemoryCodeSink.__init__
pybindgen.typehandlers.codesink.NullCodeSink.__init__
pybindgen.typehandlers.ctypeparser.CType.__init__
pybindgen.typehandlers.ctypeparser.TypeTraits.__init__
pybindgen.typehandlers.ctypeparser.tokenizer.Token.__init__
pybindgen.typehandlers.floattype.FloatPtrParam.__init__
pybindgen.typehandlers.inttype.Int8PtrParam.__init__
pybindgen.typehandlers.inttype.IntPtrParam.__init__
pybindgen.typehandlers.inttype.UInt8PtrParam.__init__
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.__init__
pybindgen.typehandlers.pyobjecttype.PyObjectParam.__init__
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.__init__
pybindgen.wrapper_registry.NullWrapperRegistry.__init__
pybindgen.wrapper_registry.StdMapWrapperRegistry.__init__
pybindgen.wrapper_registry.WrapperRegistry.__init__" class="py-name" href="#" onclick="return doclink('link-243', '__init__', 'link-224');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">ctype</tt><tt class="py-op">,</tt> <tt class="py-name">is_const</tt><tt class="py-op">)</tt> </tt>
<a name="L1172"></a><tt class="py-lineno">1172</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">call_owns_return</tt> <tt class="py-op">=</tt> <tt class="py-name">caller_owns_return</tt> </tt>
</div></div><a name="L1173"></a><tt class="py-lineno">1173</tt>  <tt class="py-line"> </tt>
<a name="L1174"></a><tt class="py-lineno">1174</tt>  <tt class="py-line"><tt id="link-244" class="py-name"><a title="pybindgen.typehandlers.base.PointerReturnValue" class="py-name" href="#" onclick="return doclink('link-244', 'PointerReturnValue', 'link-242');">PointerReturnValue</a></tt><tt class="py-op">.</tt><tt id="link-245" class="py-name"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-245', 'CTYPES', 'link-221');">CTYPES</a></tt> <tt class="py-op">=</tt> <tt class="py-name">NotImplemented</tt> </tt>
<a name="L1175"></a><tt class="py-lineno">1175</tt>  <tt class="py-line"> </tt>
<a name="L1176"></a><tt class="py-lineno">1176</tt>  <tt class="py-line"> </tt>
<a name="Parameter"></a><div id="Parameter-def"><a name="L1177"></a><tt class="py-lineno">1177</tt> <a class="py-toggle" href="#" id="Parameter-toggle" onclick="return toggle('Parameter');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.Parameter-class.html">Parameter</a><tt class="py-op">(</tt><tt class="py-base-class">TypeHandler</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Parameter-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="Parameter-expanded"><a name="L1178"></a><tt class="py-lineno">1178</tt>  <tt class="py-line">    <tt class="py-docstring">'''Abstract base class for all classes dedicated to handle specific parameter types'''</tt> </tt>
<a name="L1179"></a><tt class="py-lineno">1179</tt>  <tt class="py-line"> </tt>
<a name="L1180"></a><tt class="py-lineno">1180</tt>  <tt class="py-line">    <tt class="py-comment">## bit mask values</tt> </tt>
<a name="L1181"></a><tt class="py-lineno">1181</tt>  <tt class="py-line">    <tt id="link-246" class="py-name" targets="Variable pybindgen.typehandlers.base.Parameter.DIRECTION_IN=pybindgen.typehandlers.base.Parameter-class.html#DIRECTION_IN"><a title="pybindgen.typehandlers.base.Parameter.DIRECTION_IN" class="py-name" href="#" onclick="return doclink('link-246', 'DIRECTION_IN', 'link-246');">DIRECTION_IN</a></tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt>
<a name="L1182"></a><tt class="py-lineno">1182</tt>  <tt class="py-line">    <tt id="link-247" class="py-name" targets="Variable pybindgen.typehandlers.base.Parameter.DIRECTION_OUT=pybindgen.typehandlers.base.Parameter-class.html#DIRECTION_OUT"><a title="pybindgen.typehandlers.base.Parameter.DIRECTION_OUT" class="py-name" href="#" onclick="return doclink('link-247', 'DIRECTION_OUT', 'link-247');">DIRECTION_OUT</a></tt> <tt class="py-op">=</tt> <tt class="py-number">2</tt> </tt>
<a name="L1183"></a><tt class="py-lineno">1183</tt>  <tt class="py-line">    <tt id="link-248" class="py-name" targets="Variable pybindgen.typehandlers.base.Parameter.DIRECTION_INOUT=pybindgen.typehandlers.base.Parameter-class.html#DIRECTION_INOUT"><a title="pybindgen.typehandlers.base.Parameter.DIRECTION_INOUT" class="py-name" href="#" onclick="return doclink('link-248', 'DIRECTION_INOUT', 'link-248');">DIRECTION_INOUT</a></tt> <tt class="py-op">=</tt> <tt id="link-249" class="py-name"><a title="pybindgen.typehandlers.base.Parameter.DIRECTION_IN" class="py-name" href="#" onclick="return doclink('link-249', 'DIRECTION_IN', 'link-246');">DIRECTION_IN</a></tt><tt class="py-op">|</tt><tt id="link-250" class="py-name"><a title="pybindgen.typehandlers.base.Parameter.DIRECTION_OUT" class="py-name" href="#" onclick="return doclink('link-250', 'DIRECTION_OUT', 'link-247');">DIRECTION_OUT</a></tt> </tt>
<a name="L1184"></a><tt class="py-lineno">1184</tt>  <tt class="py-line"> </tt>
<a name="L1185"></a><tt class="py-lineno">1185</tt>  <tt class="py-line">    <tt class="py-comment">## list of possible directions for this type</tt> </tt>
<a name="L1186"></a><tt class="py-lineno">1186</tt>  <tt class="py-line">    <tt id="link-251" class="py-name" targets="Variable pybindgen.container.ContainerParameter.DIRECTIONS=pybindgen.container.ContainerParameter-class.html#DIRECTIONS,Variable pybindgen.container.ContainerParameterBase.DIRECTIONS=pybindgen.container.ContainerParameterBase-class.html#DIRECTIONS,Variable pybindgen.container.ContainerPtrParameter.DIRECTIONS=pybindgen.container.ContainerPtrParameter-class.html#DIRECTIONS,Variable pybindgen.container.ContainerRefParameter.DIRECTIONS=pybindgen.container.ContainerRefParameter-class.html#DIRECTIONS,Variable pybindgen.cppclass_typehandlers.CppClassParameter.DIRECTIONS=pybindgen.cppclass_typehandlers.CppClassParameter-class.html#DIRECTIONS,Variable pybindgen.cppclass_typehandlers.CppClassParameterBase.DIRECTIONS=pybindgen.cppclass_typehandlers.CppClassParameterBase-class.html#DIRECTIONS,Variable pybindgen.cppclass_typehandlers.CppClassPtrParameter.DIRECTIONS=pybindgen.cppclass_typehandlers.CppClassPtrParameter-class.html#DIRECTIONS,Variable pybindgen.cppclass_typehandlers.CppClassRefParameter.DIRECTIONS=pybindgen.cppclass_typehandlers.CppClassRefParameter-class.html#DIRECTIONS,Variable pybindgen.cppmethod.DummyParameter.DIRECTIONS=pybindgen.cppmethod.DummyParameter-class.html#DIRECTIONS,Variable pybindgen.typehandlers.base.Parameter.DIRECTIONS=pybindgen.typehandlers.base.Parameter-class.html#DIRECTIONS,Variable pybindgen.typehandlers.booltype.BoolParam.DIRECTIONS=pybindgen.typehandlers.booltype.BoolParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.booltype.BoolPtrParam.DIRECTIONS=pybindgen.typehandlers.booltype.BoolPtrParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.booltype.BoolRefParam.DIRECTIONS=pybindgen.typehandlers.booltype.BoolRefParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.doubletype.DoubleParam.DIRECTIONS=pybindgen.typehandlers.doubletype.DoubleParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.doubletype.DoublePtrParam.DIRECTIONS=pybindgen.typehandlers.doubletype.DoublePtrParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.doubletype.DoubleRefParam.DIRECTIONS=pybindgen.typehandlers.doubletype.DoubleRefParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.floattype.FloatParam.DIRECTIONS=pybindgen.typehandlers.floattype.FloatParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.floattype.FloatPtrParam.DIRECTIONS=pybindgen.typehandlers.floattype.FloatPtrParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.floattype.FloatRefParam.DIRECTIONS=pybindgen.typehandlers.floattype.FloatRefParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.inttype.Int16Param.DIRECTIONS=pybindgen.typehandlers.inttype.Int16Param-class.html#DIRECTIONS,Variable pybindgen.typehandlers.inttype.Int8PtrParam.DIRECTIONS=pybindgen.typehandlers.inttype.Int8PtrParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.inttype.IntParam.DIRECTIONS=pybindgen.typehandlers.inttype.IntParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.inttype.IntPtrParam.DIRECTIONS=pybindgen.typehandlers.inttype.IntPtrParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.inttype.IntRefParam.DIRECTIONS=pybindgen.typehandlers.inttype.IntRefParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.inttype.LongLongParam.DIRECTIONS=pybindgen.typehandlers.inttype.LongLongParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.inttype.LongLongRefParam.DIRECTIONS=pybindgen.typehandlers.inttype.LongLongRefParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.inttype.SizeTParam.DIRECTIONS=pybindgen.typehandlers.inttype.SizeTParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.inttype.UInt16Param.DIRECTIONS=pybindgen.typehandlers.inttype.UInt16Param-class.html#DIRECTIONS,Variable pybindgen.typehandlers.inttype.UInt8Param.DIRECTIONS=pybindgen.typehandlers.inttype.UInt8Param-class.html#DIRECTIONS,Variable pybindgen.typehandlers.inttype.UInt8PtrParam.DIRECTIONS=pybindgen.typehandlers.inttype.UInt8PtrParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.inttype.UnsignedIntParam.DIRECTIONS=pybindgen.typehandlers.inttype.UnsignedIntParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.inttype.UnsignedIntPtrParam.DIRECTIONS=pybindgen.typehandlers.inttype.UnsignedIntPtrParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.inttype.UnsignedLongLongParam.DIRECTIONS=pybindgen.typehandlers.inttype.UnsignedLongLongParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.DIRECTIONS=pybindgen.typehandlers.inttype.UnsignedLongLongRefParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.pyobjecttype.PyObjectParam.DIRECTIONS=pybindgen.typehandlers.pyobjecttype.PyObjectParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.stringtype.CStringParam.DIRECTIONS=pybindgen.typehandlers.stringtype.CStringParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.stringtype.CharParam.DIRECTIONS=pybindgen.typehandlers.stringtype.CharParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.stringtype.StdStringParam.DIRECTIONS=pybindgen.typehandlers.stringtype.StdStringParam-class.html#DIRECTIONS,Variable pybindgen.typehandlers.stringtype.StdStringRefParam.DIRECTIONS=pybindgen.typehandlers.stringtype.StdStringRefParam-class.html#DIRECTIONS"><a title="pybindgen.container.ContainerParameter.DIRECTIONS
pybindgen.container.ContainerParameterBase.DIRECTIONS
pybindgen.container.ContainerPtrParameter.DIRECTIONS
pybindgen.container.ContainerRefParameter.DIRECTIONS
pybindgen.cppclass_typehandlers.CppClassParameter.DIRECTIONS
pybindgen.cppclass_typehandlers.CppClassParameterBase.DIRECTIONS
pybindgen.cppclass_typehandlers.CppClassPtrParameter.DIRECTIONS
pybindgen.cppclass_typehandlers.CppClassRefParameter.DIRECTIONS
pybindgen.cppmethod.DummyParameter.DIRECTIONS
pybindgen.typehandlers.base.Parameter.DIRECTIONS
pybindgen.typehandlers.booltype.BoolParam.DIRECTIONS
pybindgen.typehandlers.booltype.BoolPtrParam.DIRECTIONS
pybindgen.typehandlers.booltype.BoolRefParam.DIRECTIONS
pybindgen.typehandlers.doubletype.DoubleParam.DIRECTIONS
pybindgen.typehandlers.doubletype.DoublePtrParam.DIRECTIONS
pybindgen.typehandlers.doubletype.DoubleRefParam.DIRECTIONS
pybindgen.typehandlers.floattype.FloatParam.DIRECTIONS
pybindgen.typehandlers.floattype.FloatPtrParam.DIRECTIONS
pybindgen.typehandlers.floattype.FloatRefParam.DIRECTIONS
pybindgen.typehandlers.inttype.Int16Param.DIRECTIONS
pybindgen.typehandlers.inttype.Int8PtrParam.DIRECTIONS
pybindgen.typehandlers.inttype.IntParam.DIRECTIONS
pybindgen.typehandlers.inttype.IntPtrParam.DIRECTIONS
pybindgen.typehandlers.inttype.IntRefParam.DIRECTIONS
pybindgen.typehandlers.inttype.LongLongParam.DIRECTIONS
pybindgen.typehandlers.inttype.LongLongRefParam.DIRECTIONS
pybindgen.typehandlers.inttype.SizeTParam.DIRECTIONS
pybindgen.typehandlers.inttype.UInt16Param.DIRECTIONS
pybindgen.typehandlers.inttype.UInt8Param.DIRECTIONS
pybindgen.typehandlers.inttype.UInt8PtrParam.DIRECTIONS
pybindgen.typehandlers.inttype.UnsignedIntParam.DIRECTIONS
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.DIRECTIONS
pybindgen.typehandlers.inttype.UnsignedLongLongParam.DIRECTIONS
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.DIRECTIONS
pybindgen.typehandlers.pyobjecttype.PyObjectParam.DIRECTIONS
pybindgen.typehandlers.stringtype.CStringParam.DIRECTIONS
pybindgen.typehandlers.stringtype.CharParam.DIRECTIONS
pybindgen.typehandlers.stringtype.StdStringParam.DIRECTIONS
pybindgen.typehandlers.stringtype.StdStringRefParam.DIRECTIONS" class="py-name" href="#" onclick="return doclink('link-251', 'DIRECTIONS', 'link-251');">DIRECTIONS</a></tt> <tt class="py-op">=</tt> <tt class="py-name">NotImplemented</tt> </tt>
<a name="L1187"></a><tt class="py-lineno">1187</tt>  <tt class="py-line">    <tt class="py-comment">## whether it supports type transformations</tt> </tt>
<a name="L1188"></a><tt class="py-lineno">1188</tt>  <tt class="py-line">    <tt id="link-252" class="py-name"><a title="pybindgen.cppclass_typehandlers.CppClassPtrParameter.SUPPORTS_TRANSFORMATIONS
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.SUPPORTS_TRANSFORMATIONS
pybindgen.typehandlers.base.Parameter.SUPPORTS_TRANSFORMATIONS
pybindgen.typehandlers.base.ReturnValue.SUPPORTS_TRANSFORMATIONS
pybindgen.typehandlers.base.TypeHandler.SUPPORTS_TRANSFORMATIONS" class="py-name" href="#" onclick="return doclink('link-252', 'SUPPORTS_TRANSFORMATIONS', 'link-204');">SUPPORTS_TRANSFORMATIONS</a></tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1189"></a><tt class="py-lineno">1189</tt>  <tt class="py-line">    <tt class="py-comment">## list of C type names it can handle</tt> </tt>
<a name="L1190"></a><tt class="py-lineno">1190</tt>  <tt class="py-line">    <tt id="link-253" class="py-name"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-253', 'CTYPES', 'link-221');">CTYPES</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L1191"></a><tt class="py-lineno">1191</tt>  <tt class="py-line"> </tt>
<a name="Parameter._direction_value_to_name"></a><div id="Parameter._direction_value_to_name-def"><a name="L1192"></a><tt class="py-lineno">1192</tt> <a class="py-toggle" href="#" id="Parameter._direction_value_to_name-toggle" onclick="return toggle('Parameter._direction_value_to_name');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.Parameter-class.html#_direction_value_to_name">_direction_value_to_name</a><tt class="py-op">(</tt><tt class="py-param">cls</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Parameter._direction_value_to_name-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Parameter._direction_value_to_name-expanded"><a name="L1193"></a><tt class="py-lineno">1193</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">value</tt> <tt class="py-op">==</tt> <tt class="py-name">cls</tt><tt class="py-op">.</tt><tt id="link-254" class="py-name"><a title="pybindgen.typehandlers.base.Parameter.DIRECTION_IN" class="py-name" href="#" onclick="return doclink('link-254', 'DIRECTION_IN', 'link-246');">DIRECTION_IN</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1194"></a><tt class="py-lineno">1194</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-string">"DIRECTION_IN"</tt> </tt>
<a name="L1195"></a><tt class="py-lineno">1195</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">value</tt> <tt class="py-op">==</tt> <tt class="py-name">cls</tt><tt class="py-op">.</tt><tt id="link-255" class="py-name"><a title="pybindgen.typehandlers.base.Parameter.DIRECTION_OUT" class="py-name" href="#" onclick="return doclink('link-255', 'DIRECTION_OUT', 'link-247');">DIRECTION_OUT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1196"></a><tt class="py-lineno">1196</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-string">"DIRECTION_OUT"</tt> </tt>
<a name="L1197"></a><tt class="py-lineno">1197</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">value</tt> <tt class="py-op">==</tt> <tt class="py-name">cls</tt><tt class="py-op">.</tt><tt id="link-256" class="py-name"><a title="pybindgen.typehandlers.base.Parameter.DIRECTION_INOUT" class="py-name" href="#" onclick="return doclink('link-256', 'DIRECTION_INOUT', 'link-248');">DIRECTION_INOUT</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1198"></a><tt class="py-lineno">1198</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-string">"DIRECTION_INOUT"</tt> </tt>
<a name="L1199"></a><tt class="py-lineno">1199</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1200"></a><tt class="py-lineno">1200</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-string">"(invalid %r)"</tt> <tt class="py-op">%</tt> <tt class="py-name">value</tt> </tt>
</div><a name="L1201"></a><tt class="py-lineno">1201</tt>  <tt class="py-line">    <tt class="py-name">_direction_value_to_name</tt> <tt class="py-op">=</tt> <tt class="py-name">classmethod</tt><tt class="py-op">(</tt><tt class="py-name">_direction_value_to_name</tt><tt class="py-op">)</tt> </tt>
<a name="L1202"></a><tt class="py-lineno">1202</tt>  <tt class="py-line"> </tt>
<a name="Parameter.__metaclass__"></a><div id="Parameter.__metaclass__-def"><a name="L1203"></a><tt class="py-lineno">1203</tt> <a class="py-toggle" href="#" id="Parameter.__metaclass__-toggle" onclick="return toggle('Parameter.__metaclass__');">-</a><tt class="py-line">    <tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.Parameter.__metaclass__-class.html">__metaclass__</a><tt class="py-op">(</tt><tt class="py-base-class">type</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Parameter.__metaclass__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Parameter.__metaclass__-expanded"><a name="L1204"></a><tt class="py-lineno">1204</tt>  <tt class="py-line">        <tt class="py-docstring">"Metaclass for automatically registering parameter type handlers"</tt> </tt>
<a name="Parameter.__metaclass__.__init__"></a><div id="Parameter.__metaclass__.__init__-def"><a name="L1205"></a><tt class="py-lineno">1205</tt> <a class="py-toggle" href="#" id="Parameter.__metaclass__.__init__-toggle" onclick="return toggle('Parameter.__metaclass__.__init__');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.Parameter.__metaclass__-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">mcs</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">bases</tt><tt class="py-op">,</tt> <tt class="py-param">dict_</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Parameter.__metaclass__.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++++++++++"></div><div id="Parameter.__metaclass__.__init__-expanded"><a name="L1206"></a><tt class="py-lineno">1206</tt>  <tt class="py-line">            <tt class="py-docstring">"metaclass __init__"</tt> </tt>
<a name="L1207"></a><tt class="py-lineno">1207</tt>  <tt class="py-line">            <tt class="py-name">type</tt><tt class="py-op">.</tt><tt id="link-257" class="py-name"><a title="pybindgen.container.Container.__init__
pybindgen.container.ContainerParameterBase.__init__
pybindgen.container.ContainerPtrParameter.__init__
pybindgen.container.ContainerReturnValue.__init__
pybindgen.container.ContainerReturnValueBase.__init__
pybindgen.container.ContainerTraits.__init__
pybindgen.container.IterNextWrapper.__init__
pybindgen.converter_functions.CToPythonConverter.__init__
pybindgen.converter_functions.PythonToCConverter.__init__
pybindgen.cppattribute.CppInstanceAttributeGetter.__init__
pybindgen.cppattribute.CppInstanceAttributeSetter.__init__
pybindgen.cppattribute.CppStaticAttributeGetter.__init__
pybindgen.cppattribute.CppStaticAttributeSetter.__init__
pybindgen.cppattribute.PyGetSetDef.__init__
pybindgen.cppattribute.PyMetaclass.__init__
pybindgen.cppclass.CppClass.__init__
pybindgen.cppclass.CppHelperClass.__init__
pybindgen.cppclass.FreeFunctionPolicy.__init__
pybindgen.cppclass.MemoryPolicy.__init__
pybindgen.cppclass.ReferenceCountingFunctionsPolicy.__init__
pybindgen.cppclass.ReferenceCountingMethodsPolicy.__init__
pybindgen.cppclass_typehandlers.CppClassParameterBase.__init__
pybindgen.cppclass_typehandlers.CppClassPtrParameter.__init__
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.__init__
pybindgen.cppclass_typehandlers.CppClassRefParameter.__init__
pybindgen.cppclass_typehandlers.CppClassReturnValue.__init__
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.__init__
pybindgen.cppmethod.CppConstructor.__init__
pybindgen.cppmethod.CppDummyMethod.__init__
pybindgen.cppmethod.CppFunctionAsConstructor.__init__
pybindgen.cppmethod.CppMethod.__init__
pybindgen.cppmethod.CppNoConstructor.__init__
pybindgen.cppmethod.CppVirtualMethodParentCaller.__init__
pybindgen.cppmethod.CppVirtualMethodProxy.__init__
pybindgen.cppmethod.CustomCppConstructorWrapper.__init__
pybindgen.cppmethod.CustomCppMethodWrapper.__init__
pybindgen.cppmethod.DummyParameter.__init__
pybindgen.cppmethod.DummyReturnValue.__init__
pybindgen.enum.Enum.__init__
pybindgen.function.CustomFunctionWrapper.__init__
pybindgen.function.Function.__init__
pybindgen.gccxmlparser.AnnotationsScanner.__init__
pybindgen.gccxmlparser.GccXmlTypeRegistry.__init__
pybindgen.gccxmlparser.ModuleParser.__init__
pybindgen.gccxmlparser.PygenSection.__init__
pybindgen.module.Module.__init__
pybindgen.module.ModuleBase.__init__
pybindgen.module.SubModule.__init__
pybindgen.overloading.OverloadedWrapper.__init__
pybindgen.pytypeobject.PyNumberMethods.__init__
pybindgen.pytypeobject.PySequenceMethods.__init__
pybindgen.pytypeobject.PyTypeObject.__init__
pybindgen.typehandlers.base.BuildValueParameters.__init__
pybindgen.typehandlers.base.CodeBlock.CleanupHandle.__init__
pybindgen.typehandlers.base.CodeBlock.__init__
pybindgen.typehandlers.base.DeclarationsScope.__init__
pybindgen.typehandlers.base.ForwardWrapperBase.__init__
pybindgen.typehandlers.base.Parameter.__init__
pybindgen.typehandlers.base.Parameter.__metaclass__.__init__
pybindgen.typehandlers.base.ParseTupleParameters.__init__
pybindgen.typehandlers.base.PointerParameter.__init__
pybindgen.typehandlers.base.PointerReturnValue.__init__
pybindgen.typehandlers.base.ReturnValue.__init__
pybindgen.typehandlers.base.ReturnValue.__metaclass__.__init__
pybindgen.typehandlers.base.ReverseWrapperBase.__init__
pybindgen.typehandlers.base.TypeHandler.__init__
pybindgen.typehandlers.base.TypeMatcher.__init__
pybindgen.typehandlers.codesink.CodeSink.__init__
pybindgen.typehandlers.codesink.FileCodeSink.__init__
pybindgen.typehandlers.codesink.MemoryCodeSink.__init__
pybindgen.typehandlers.codesink.NullCodeSink.__init__
pybindgen.typehandlers.ctypeparser.CType.__init__
pybindgen.typehandlers.ctypeparser.TypeTraits.__init__
pybindgen.typehandlers.ctypeparser.tokenizer.Token.__init__
pybindgen.typehandlers.floattype.FloatPtrParam.__init__
pybindgen.typehandlers.inttype.Int8PtrParam.__init__
pybindgen.typehandlers.inttype.IntPtrParam.__init__
pybindgen.typehandlers.inttype.UInt8PtrParam.__init__
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.__init__
pybindgen.typehandlers.pyobjecttype.PyObjectParam.__init__
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.__init__
pybindgen.wrapper_registry.NullWrapperRegistry.__init__
pybindgen.wrapper_registry.StdMapWrapperRegistry.__init__
pybindgen.wrapper_registry.WrapperRegistry.__init__" class="py-name" href="#" onclick="return doclink('link-257', '__init__', 'link-224');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">mcs</tt><tt class="py-op">,</tt> <tt id="link-258" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-258', 'name', 'link-4');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">bases</tt><tt class="py-op">,</tt> <tt class="py-name">dict_</tt><tt class="py-op">)</tt> </tt>
<a name="L1208"></a><tt class="py-lineno">1208</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">__debug__</tt><tt class="py-op">:</tt> </tt>
<a name="L1209"></a><tt class="py-lineno">1209</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1210"></a><tt class="py-lineno">1210</tt>  <tt class="py-line">                    <tt class="py-name">iter</tt><tt class="py-op">(</tt><tt class="py-name">mcs</tt><tt class="py-op">.</tt><tt id="link-259" class="py-name"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-259', 'CTYPES', 'link-221');">CTYPES</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1211"></a><tt class="py-lineno">1211</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">TypeError</tt><tt class="py-op">:</tt> </tt>
<a name="L1212"></a><tt class="py-lineno">1212</tt>  <tt class="py-line">                    <tt class="py-keyword">print</tt> <tt class="py-string">"ERROR: missing CTYPES on class "</tt><tt class="py-op">,</tt> <tt class="py-name">mcs</tt> </tt>
<a name="L1213"></a><tt class="py-lineno">1213</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">ctype</tt> <tt class="py-keyword">in</tt> <tt class="py-name">mcs</tt><tt class="py-op">.</tt><tt id="link-260" class="py-name"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-260', 'CTYPES', 'link-221');">CTYPES</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1214"></a><tt class="py-lineno">1214</tt>  <tt class="py-line">                <tt id="link-261" class="py-name" targets="Variable pybindgen.typehandlers.base.param_type_matcher=pybindgen.typehandlers.base-module.html#param_type_matcher"><a title="pybindgen.typehandlers.base.param_type_matcher" class="py-name" href="#" onclick="return doclink('link-261', 'param_type_matcher', 'link-261');">param_type_matcher</a></tt><tt class="py-op">.</tt><tt id="link-262" class="py-name"><a title="pybindgen.typehandlers.base.TypeMatcher.register" class="py-name" href="#" onclick="return doclink('link-262', 'register', 'link-229');">register</a></tt><tt class="py-op">(</tt><tt class="py-name">ctype</tt><tt class="py-op">,</tt> <tt class="py-name">mcs</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L1215"></a><tt class="py-lineno">1215</tt>  <tt class="py-line"> </tt>
<a name="L1216"></a><tt class="py-lineno">1216</tt>  <tt class="py-line">    <tt class="py-comment">#@classmethod</tt> </tt>
<a name="Parameter.new"></a><div id="Parameter.new-def"><a name="L1217"></a><tt class="py-lineno">1217</tt> <a class="py-toggle" href="#" id="Parameter.new-toggle" onclick="return toggle('Parameter.new');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.Parameter-class.html#new">new</a><tt class="py-op">(</tt><tt class="py-param">cls</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Parameter.new-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Parameter.new-expanded"><a name="L1218"></a><tt class="py-lineno">1218</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1219"></a><tt class="py-lineno">1219</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; import inttype</tt> </tt>
<a name="L1220"></a><tt class="py-lineno">1220</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; isinstance(Parameter.new('int', 'name'), inttype.IntParam)</tt> </tt>
<a name="L1221"></a><tt class="py-lineno">1221</tt>  <tt class="py-line"><tt class="py-docstring">        True</tt> </tt>
<a name="L1222"></a><tt class="py-lineno">1222</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1223"></a><tt class="py-lineno">1223</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">cls</tt> <tt class="py-keyword">is</tt> <tt id="link-263" class="py-name"><a title="pybindgen.typehandlers.base.Parameter" class="py-name" href="#" onclick="return doclink('link-263', 'Parameter', 'link-75');">Parameter</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1224"></a><tt class="py-lineno">1224</tt>  <tt class="py-line">            <tt class="py-comment"># support calling Parameter("typename", ...)</tt> </tt>
<a name="L1225"></a><tt class="py-lineno">1225</tt>  <tt class="py-line">            <tt class="py-name">ctype</tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1226"></a><tt class="py-lineno">1226</tt>  <tt class="py-line">            <tt class="py-name">type_handler_class</tt><tt class="py-op">,</tt> <tt class="py-name">transformation</tt><tt class="py-op">,</tt> <tt class="py-name">type_traits</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L1227"></a><tt class="py-lineno">1227</tt>  <tt class="py-line">                <tt id="link-264" class="py-name"><a title="pybindgen.typehandlers.base.param_type_matcher" class="py-name" href="#" onclick="return doclink('link-264', 'param_type_matcher', 'link-261');">param_type_matcher</a></tt><tt class="py-op">.</tt><tt id="link-265" class="py-name"><a title="pybindgen.typehandlers.base.TypeMatcher.lookup" class="py-name" href="#" onclick="return doclink('link-265', 'lookup', 'link-232');">lookup</a></tt><tt class="py-op">(</tt><tt class="py-name">ctype</tt><tt class="py-op">)</tt> </tt>
<a name="L1228"></a><tt class="py-lineno">1228</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt class="py-name">type_handler_class</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt> </tt>
<a name="L1229"></a><tt class="py-lineno">1229</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">transformation</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1230"></a><tt class="py-lineno">1230</tt>  <tt class="py-line">                <tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> </tt>
<a name="L1231"></a><tt class="py-lineno">1231</tt>  <tt class="py-line">                <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">type_traits</tt> </tt>
<a name="L1232"></a><tt class="py-lineno">1232</tt>  <tt class="py-line">                <tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-name">tuple</tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> </tt>
<a name="L1233"></a><tt class="py-lineno">1233</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1234"></a><tt class="py-lineno">1234</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">type_handler_class</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
<a name="L1235"></a><tt class="py-lineno">1235</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">TypeError</tt><tt class="py-op">,</tt> <tt class="py-name">ex</tt><tt class="py-op">:</tt> </tt>
<a name="L1236"></a><tt class="py-lineno">1236</tt>  <tt class="py-line">                    <tt class="py-name">warnings</tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">"Exception %r in type handler %s constructor"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">ex</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">type_handler_class</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1237"></a><tt class="py-lineno">1237</tt>  <tt class="py-line">                    <tt class="py-keyword">raise</tt> </tt>
<a name="L1238"></a><tt class="py-lineno">1238</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1239"></a><tt class="py-lineno">1239</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">transformation</tt><tt class="py-op">.</tt><tt id="link-266" class="py-name"><a title="pybindgen.typehandlers.base.NullTypeTransformation.create_type_handler
pybindgen.typehandlers.base.TypeTransformation.create_type_handler" class="py-name" href="#" onclick="return doclink('link-266', 'create_type_handler', 'link-233');">create_type_handler</a></tt><tt class="py-op">(</tt><tt class="py-name">type_handler_class</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
<a name="L1240"></a><tt class="py-lineno">1240</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1241"></a><tt class="py-lineno">1241</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">cls</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1242"></a><tt class="py-lineno">1242</tt>  <tt class="py-line"> </tt>
<a name="L1243"></a><tt class="py-lineno">1243</tt>  <tt class="py-line">    <tt id="link-267" class="py-name"><a title="pybindgen.typehandlers.base.Parameter.new
pybindgen.typehandlers.base.ReturnValue.new" class="py-name" href="#" onclick="return doclink('link-267', 'new', 'link-234');">new</a></tt> <tt class="py-op">=</tt> <tt class="py-name">classmethod</tt><tt class="py-op">(</tt><tt id="link-268" class="py-name"><a title="pybindgen.typehandlers.base.Parameter.new
pybindgen.typehandlers.base.ReturnValue.new" class="py-name" href="#" onclick="return doclink('link-268', 'new', 'link-234');">new</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1244"></a><tt class="py-lineno">1244</tt>  <tt class="py-line"> </tt>
<a name="Parameter.__init__"></a><div id="Parameter.__init__-def"><a name="L1245"></a><tt class="py-lineno">1245</tt> <a class="py-toggle" href="#" id="Parameter.__init__-toggle" onclick="return toggle('Parameter.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.Parameter-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">ctype</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">direction</tt><tt class="py-op">=</tt><tt id="link-269" class="py-name"><a title="pybindgen.typehandlers.base.Parameter.DIRECTION_IN" class="py-name" href="#" onclick="return doclink('link-269', 'DIRECTION_IN', 'link-246');">DIRECTION_IN</a></tt><tt class="py-op">,</tt> <tt class="py-param">is_const</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-param">default_value</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Parameter.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Parameter.__init__-expanded"><a name="L1246"></a><tt class="py-lineno">1246</tt>  <tt class="py-line">        <tt class="py-docstring">'''</tt> </tt>
<a name="L1247"></a><tt class="py-lineno">1247</tt>  <tt class="py-line"><tt class="py-docstring">        Creates a parameter object</tt> </tt>
<a name="L1248"></a><tt class="py-lineno">1248</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1249"></a><tt class="py-lineno">1249</tt>  <tt class="py-line"><tt class="py-docstring">        Keywork Arguments:</tt> </tt>
<a name="L1250"></a><tt class="py-lineno">1250</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1251"></a><tt class="py-lineno">1251</tt>  <tt class="py-line"><tt class="py-docstring">        @param ctype: actual C/C++ type being used</tt> </tt>
<a name="L1252"></a><tt class="py-lineno">1252</tt>  <tt class="py-line"><tt class="py-docstring">        @param name: parameter name</tt> </tt>
<a name="L1253"></a><tt class="py-lineno">1253</tt>  <tt class="py-line"><tt class="py-docstring">        @param direction: direction of the parameter transfer, valid values</tt> </tt>
<a name="L1254"></a><tt class="py-lineno">1254</tt>  <tt class="py-line"><tt class="py-docstring">                     are DIRECTION_IN, DIRECTION_OUT, and</tt> </tt>
<a name="L1255"></a><tt class="py-lineno">1255</tt>  <tt class="py-line"><tt class="py-docstring">                     DIRECTION_IN|DIRECTION_OUT</tt> </tt>
<a name="L1256"></a><tt class="py-lineno">1256</tt>  <tt class="py-line"><tt class="py-docstring">        '''</tt> </tt>
<a name="L1257"></a><tt class="py-lineno">1257</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt id="link-270" class="py-name"><a title="pybindgen.typehandlers.base.Parameter" class="py-name" href="#" onclick="return doclink('link-270', 'Parameter', 'link-75');">Parameter</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1258"></a><tt class="py-lineno">1258</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt><tt class="py-op">(</tt><tt class="py-string">'Parameter is an abstract class; use Parameter.new(...)'</tt><tt class="py-op">)</tt> </tt>
<a name="L1259"></a><tt class="py-lineno">1259</tt>  <tt class="py-line">        <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-271" class="py-name"><a title="pybindgen.typehandlers.base.Parameter" class="py-name" href="#" onclick="return doclink('link-271', 'Parameter', 'link-75');">Parameter</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-272" class="py-name"><a title="pybindgen.container.Container.__init__
pybindgen.container.ContainerParameterBase.__init__
pybindgen.container.ContainerPtrParameter.__init__
pybindgen.container.ContainerReturnValue.__init__
pybindgen.container.ContainerReturnValueBase.__init__
pybindgen.container.ContainerTraits.__init__
pybindgen.container.IterNextWrapper.__init__
pybindgen.converter_functions.CToPythonConverter.__init__
pybindgen.converter_functions.PythonToCConverter.__init__
pybindgen.cppattribute.CppInstanceAttributeGetter.__init__
pybindgen.cppattribute.CppInstanceAttributeSetter.__init__
pybindgen.cppattribute.CppStaticAttributeGetter.__init__
pybindgen.cppattribute.CppStaticAttributeSetter.__init__
pybindgen.cppattribute.PyGetSetDef.__init__
pybindgen.cppattribute.PyMetaclass.__init__
pybindgen.cppclass.CppClass.__init__
pybindgen.cppclass.CppHelperClass.__init__
pybindgen.cppclass.FreeFunctionPolicy.__init__
pybindgen.cppclass.MemoryPolicy.__init__
pybindgen.cppclass.ReferenceCountingFunctionsPolicy.__init__
pybindgen.cppclass.ReferenceCountingMethodsPolicy.__init__
pybindgen.cppclass_typehandlers.CppClassParameterBase.__init__
pybindgen.cppclass_typehandlers.CppClassPtrParameter.__init__
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.__init__
pybindgen.cppclass_typehandlers.CppClassRefParameter.__init__
pybindgen.cppclass_typehandlers.CppClassReturnValue.__init__
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.__init__
pybindgen.cppmethod.CppConstructor.__init__
pybindgen.cppmethod.CppDummyMethod.__init__
pybindgen.cppmethod.CppFunctionAsConstructor.__init__
pybindgen.cppmethod.CppMethod.__init__
pybindgen.cppmethod.CppNoConstructor.__init__
pybindgen.cppmethod.CppVirtualMethodParentCaller.__init__
pybindgen.cppmethod.CppVirtualMethodProxy.__init__
pybindgen.cppmethod.CustomCppConstructorWrapper.__init__
pybindgen.cppmethod.CustomCppMethodWrapper.__init__
pybindgen.cppmethod.DummyParameter.__init__
pybindgen.cppmethod.DummyReturnValue.__init__
pybindgen.enum.Enum.__init__
pybindgen.function.CustomFunctionWrapper.__init__
pybindgen.function.Function.__init__
pybindgen.gccxmlparser.AnnotationsScanner.__init__
pybindgen.gccxmlparser.GccXmlTypeRegistry.__init__
pybindgen.gccxmlparser.ModuleParser.__init__
pybindgen.gccxmlparser.PygenSection.__init__
pybindgen.module.Module.__init__
pybindgen.module.ModuleBase.__init__
pybindgen.module.SubModule.__init__
pybindgen.overloading.OverloadedWrapper.__init__
pybindgen.pytypeobject.PyNumberMethods.__init__
pybindgen.pytypeobject.PySequenceMethods.__init__
pybindgen.pytypeobject.PyTypeObject.__init__
pybindgen.typehandlers.base.BuildValueParameters.__init__
pybindgen.typehandlers.base.CodeBlock.CleanupHandle.__init__
pybindgen.typehandlers.base.CodeBlock.__init__
pybindgen.typehandlers.base.DeclarationsScope.__init__
pybindgen.typehandlers.base.ForwardWrapperBase.__init__
pybindgen.typehandlers.base.Parameter.__init__
pybindgen.typehandlers.base.Parameter.__metaclass__.__init__
pybindgen.typehandlers.base.ParseTupleParameters.__init__
pybindgen.typehandlers.base.PointerParameter.__init__
pybindgen.typehandlers.base.PointerReturnValue.__init__
pybindgen.typehandlers.base.ReturnValue.__init__
pybindgen.typehandlers.base.ReturnValue.__metaclass__.__init__
pybindgen.typehandlers.base.ReverseWrapperBase.__init__
pybindgen.typehandlers.base.TypeHandler.__init__
pybindgen.typehandlers.base.TypeMatcher.__init__
pybindgen.typehandlers.codesink.CodeSink.__init__
pybindgen.typehandlers.codesink.FileCodeSink.__init__
pybindgen.typehandlers.codesink.MemoryCodeSink.__init__
pybindgen.typehandlers.codesink.NullCodeSink.__init__
pybindgen.typehandlers.ctypeparser.CType.__init__
pybindgen.typehandlers.ctypeparser.TypeTraits.__init__
pybindgen.typehandlers.ctypeparser.tokenizer.Token.__init__
pybindgen.typehandlers.floattype.FloatPtrParam.__init__
pybindgen.typehandlers.inttype.Int8PtrParam.__init__
pybindgen.typehandlers.inttype.IntPtrParam.__init__
pybindgen.typehandlers.inttype.UInt8PtrParam.__init__
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.__init__
pybindgen.typehandlers.pyobjecttype.PyObjectParam.__init__
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.__init__
pybindgen.wrapper_registry.NullWrapperRegistry.__init__
pybindgen.wrapper_registry.StdMapWrapperRegistry.__init__
pybindgen.wrapper_registry.WrapperRegistry.__init__" class="py-name" href="#" onclick="return doclink('link-272', '__init__', 'link-224');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">ctype</tt><tt class="py-op">,</tt> <tt class="py-name">is_const</tt><tt class="py-op">)</tt> </tt>
<a name="L1260"></a><tt class="py-lineno">1260</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-273" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-273', 'name', 'link-4');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-274" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-274', 'name', 'link-4');">name</a></tt> </tt>
<a name="L1261"></a><tt class="py-lineno">1261</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">direction</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-275" class="py-name"><a title="pybindgen.container.ContainerParameter.DIRECTIONS
pybindgen.container.ContainerParameterBase.DIRECTIONS
pybindgen.container.ContainerPtrParameter.DIRECTIONS
pybindgen.container.ContainerRefParameter.DIRECTIONS
pybindgen.cppclass_typehandlers.CppClassParameter.DIRECTIONS
pybindgen.cppclass_typehandlers.CppClassParameterBase.DIRECTIONS
pybindgen.cppclass_typehandlers.CppClassPtrParameter.DIRECTIONS
pybindgen.cppclass_typehandlers.CppClassRefParameter.DIRECTIONS
pybindgen.cppmethod.DummyParameter.DIRECTIONS
pybindgen.typehandlers.base.Parameter.DIRECTIONS
pybindgen.typehandlers.booltype.BoolParam.DIRECTIONS
pybindgen.typehandlers.booltype.BoolPtrParam.DIRECTIONS
pybindgen.typehandlers.booltype.BoolRefParam.DIRECTIONS
pybindgen.typehandlers.doubletype.DoubleParam.DIRECTIONS
pybindgen.typehandlers.doubletype.DoublePtrParam.DIRECTIONS
pybindgen.typehandlers.doubletype.DoubleRefParam.DIRECTIONS
pybindgen.typehandlers.floattype.FloatParam.DIRECTIONS
pybindgen.typehandlers.floattype.FloatPtrParam.DIRECTIONS
pybindgen.typehandlers.floattype.FloatRefParam.DIRECTIONS
pybindgen.typehandlers.inttype.Int16Param.DIRECTIONS
pybindgen.typehandlers.inttype.Int8PtrParam.DIRECTIONS
pybindgen.typehandlers.inttype.IntParam.DIRECTIONS
pybindgen.typehandlers.inttype.IntPtrParam.DIRECTIONS
pybindgen.typehandlers.inttype.IntRefParam.DIRECTIONS
pybindgen.typehandlers.inttype.LongLongParam.DIRECTIONS
pybindgen.typehandlers.inttype.LongLongRefParam.DIRECTIONS
pybindgen.typehandlers.inttype.SizeTParam.DIRECTIONS
pybindgen.typehandlers.inttype.UInt16Param.DIRECTIONS
pybindgen.typehandlers.inttype.UInt8Param.DIRECTIONS
pybindgen.typehandlers.inttype.UInt8PtrParam.DIRECTIONS
pybindgen.typehandlers.inttype.UnsignedIntParam.DIRECTIONS
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.DIRECTIONS
pybindgen.typehandlers.inttype.UnsignedLongLongParam.DIRECTIONS
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.DIRECTIONS
pybindgen.typehandlers.pyobjecttype.PyObjectParam.DIRECTIONS
pybindgen.typehandlers.stringtype.CStringParam.DIRECTIONS
pybindgen.typehandlers.stringtype.CharParam.DIRECTIONS
pybindgen.typehandlers.stringtype.StdStringParam.DIRECTIONS
pybindgen.typehandlers.stringtype.StdStringRefParam.DIRECTIONS" class="py-name" href="#" onclick="return doclink('link-275', 'DIRECTIONS', 'link-251');">DIRECTIONS</a></tt><tt class="py-op">,</tt> \ </tt>
<a name="L1262"></a><tt class="py-lineno">1262</tt>  <tt class="py-line">            <tt class="py-string">"Error: requested direction %s for type handler %r (ctype=%r), but it only supports directions %r"</tt>\ </tt>
<a name="L1263"></a><tt class="py-lineno">1263</tt>  <tt class="py-line">            <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_direction_value_to_name</tt><tt class="py-op">(</tt><tt class="py-name">direction</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt><tt class="py-op">,</tt> </tt>
<a name="L1264"></a><tt class="py-lineno">1264</tt>  <tt class="py-line">               <tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_direction_value_to_name</tt><tt class="py-op">(</tt><tt class="py-name">d</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">d</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-276" class="py-name"><a title="pybindgen.container.ContainerParameter.DIRECTIONS
pybindgen.container.ContainerParameterBase.DIRECTIONS
pybindgen.container.ContainerPtrParameter.DIRECTIONS
pybindgen.container.ContainerRefParameter.DIRECTIONS
pybindgen.cppclass_typehandlers.CppClassParameter.DIRECTIONS
pybindgen.cppclass_typehandlers.CppClassParameterBase.DIRECTIONS
pybindgen.cppclass_typehandlers.CppClassPtrParameter.DIRECTIONS
pybindgen.cppclass_typehandlers.CppClassRefParameter.DIRECTIONS
pybindgen.cppmethod.DummyParameter.DIRECTIONS
pybindgen.typehandlers.base.Parameter.DIRECTIONS
pybindgen.typehandlers.booltype.BoolParam.DIRECTIONS
pybindgen.typehandlers.booltype.BoolPtrParam.DIRECTIONS
pybindgen.typehandlers.booltype.BoolRefParam.DIRECTIONS
pybindgen.typehandlers.doubletype.DoubleParam.DIRECTIONS
pybindgen.typehandlers.doubletype.DoublePtrParam.DIRECTIONS
pybindgen.typehandlers.doubletype.DoubleRefParam.DIRECTIONS
pybindgen.typehandlers.floattype.FloatParam.DIRECTIONS
pybindgen.typehandlers.floattype.FloatPtrParam.DIRECTIONS
pybindgen.typehandlers.floattype.FloatRefParam.DIRECTIONS
pybindgen.typehandlers.inttype.Int16Param.DIRECTIONS
pybindgen.typehandlers.inttype.Int8PtrParam.DIRECTIONS
pybindgen.typehandlers.inttype.IntParam.DIRECTIONS
pybindgen.typehandlers.inttype.IntPtrParam.DIRECTIONS
pybindgen.typehandlers.inttype.IntRefParam.DIRECTIONS
pybindgen.typehandlers.inttype.LongLongParam.DIRECTIONS
pybindgen.typehandlers.inttype.LongLongRefParam.DIRECTIONS
pybindgen.typehandlers.inttype.SizeTParam.DIRECTIONS
pybindgen.typehandlers.inttype.UInt16Param.DIRECTIONS
pybindgen.typehandlers.inttype.UInt8Param.DIRECTIONS
pybindgen.typehandlers.inttype.UInt8PtrParam.DIRECTIONS
pybindgen.typehandlers.inttype.UnsignedIntParam.DIRECTIONS
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.DIRECTIONS
pybindgen.typehandlers.inttype.UnsignedLongLongParam.DIRECTIONS
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.DIRECTIONS
pybindgen.typehandlers.pyobjecttype.PyObjectParam.DIRECTIONS
pybindgen.typehandlers.stringtype.CStringParam.DIRECTIONS
pybindgen.typehandlers.stringtype.CharParam.DIRECTIONS
pybindgen.typehandlers.stringtype.StdStringParam.DIRECTIONS
pybindgen.typehandlers.stringtype.StdStringRefParam.DIRECTIONS" class="py-name" href="#" onclick="return doclink('link-276', 'DIRECTIONS', 'link-251');">DIRECTIONS</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1265"></a><tt class="py-lineno">1265</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">direction</tt> <tt class="py-op">=</tt> <tt class="py-name">direction</tt> </tt>
<a name="L1266"></a><tt class="py-lineno">1266</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt id="link-277" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-277', 'name', 'link-4');">name</a></tt> </tt>
<a name="L1267"></a><tt class="py-lineno">1267</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">default_value</tt> <tt class="py-op">=</tt> <tt class="py-name">default_value</tt> </tt>
</div><a name="L1268"></a><tt class="py-lineno">1268</tt>  <tt class="py-line"> </tt>
<a name="Parameter.convert_c_to_python"></a><div id="Parameter.convert_c_to_python-def"><a name="L1269"></a><tt class="py-lineno">1269</tt> <a class="py-toggle" href="#" id="Parameter.convert_c_to_python-toggle" onclick="return toggle('Parameter.convert_c_to_python');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.Parameter-class.html#convert_c_to_python">convert_c_to_python</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">wrapper</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Parameter.convert_c_to_python-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Parameter.convert_c_to_python-expanded"><a name="L1270"></a><tt class="py-lineno">1270</tt>  <tt class="py-line">        <tt class="py-docstring">'''Write some code before calling the Python method.'''</tt> </tt>
<a name="L1271"></a><tt class="py-lineno">1271</tt>  <tt class="py-line">        <tt class="py-comment">#assert isinstance(wrapper, ReverseWrapperBase)</tt> </tt>
<a name="L1272"></a><tt class="py-lineno">1272</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt> </tt>
</div><a name="L1273"></a><tt class="py-lineno">1273</tt>  <tt class="py-line"> </tt>
<a name="Parameter.convert_python_to_c"></a><div id="Parameter.convert_python_to_c-def"><a name="L1274"></a><tt class="py-lineno">1274</tt> <a class="py-toggle" href="#" id="Parameter.convert_python_to_c-toggle" onclick="return toggle('Parameter.convert_python_to_c');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.Parameter-class.html#convert_python_to_c">convert_python_to_c</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">wrapper</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Parameter.convert_python_to_c-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="Parameter.convert_python_to_c-expanded"><a name="L1275"></a><tt class="py-lineno">1275</tt>  <tt class="py-line">        <tt class="py-docstring">'''Write some code before calling the C method.'''</tt> </tt>
<a name="L1276"></a><tt class="py-lineno">1276</tt>  <tt class="py-line">        <tt class="py-comment">#assert isinstance(wrapper, ReverseWrapperBase)</tt> </tt>
<a name="L1277"></a><tt class="py-lineno">1277</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt> </tt>
</div></div><a name="L1278"></a><tt class="py-lineno">1278</tt>  <tt class="py-line"> </tt>
<a name="L1279"></a><tt class="py-lineno">1279</tt>  <tt class="py-line"><tt id="link-278" class="py-name"><a title="pybindgen.typehandlers.base.Parameter" class="py-name" href="#" onclick="return doclink('link-278', 'Parameter', 'link-75');">Parameter</a></tt><tt class="py-op">.</tt><tt id="link-279" class="py-name"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-279', 'CTYPES', 'link-221');">CTYPES</a></tt> <tt class="py-op">=</tt> <tt class="py-name">NotImplemented</tt> </tt>
<a name="L1280"></a><tt class="py-lineno">1280</tt>  <tt class="py-line"> </tt>
<a name="PointerParameter"></a><div id="PointerParameter-def"><a name="L1281"></a><tt class="py-lineno">1281</tt> <a class="py-toggle" href="#" id="PointerParameter-toggle" onclick="return toggle('PointerParameter');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.PointerParameter-class.html">PointerParameter</a><tt class="py-op">(</tt><tt class="py-base-class">Parameter</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="PointerParameter-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="PointerParameter-expanded"><a name="L1282"></a><tt class="py-lineno">1282</tt>  <tt class="py-line">    <tt class="py-docstring">"""Base class for all pointer-to-something handlers"""</tt> </tt>
<a name="L1283"></a><tt class="py-lineno">1283</tt>  <tt class="py-line"> </tt>
<a name="L1284"></a><tt class="py-lineno">1284</tt>  <tt class="py-line">    <tt id="link-280" class="py-name"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-280', 'CTYPES', 'link-221');">CTYPES</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L1285"></a><tt class="py-lineno">1285</tt>  <tt class="py-line"> </tt>
<a name="PointerParameter.__init__"></a><div id="PointerParameter.__init__-def"><a name="L1286"></a><tt class="py-lineno">1286</tt> <a class="py-toggle" href="#" id="PointerParameter.__init__-toggle" onclick="return toggle('PointerParameter.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.PointerParameter-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">ctype</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">direction</tt><tt class="py-op">=</tt><tt id="link-281" class="py-name"><a title="pybindgen.typehandlers.base.Parameter" class="py-name" href="#" onclick="return doclink('link-281', 'Parameter', 'link-75');">Parameter</a></tt><tt class="py-op">.</tt><tt id="link-282" class="py-name"><a title="pybindgen.typehandlers.base.Parameter.DIRECTION_IN" class="py-name" href="#" onclick="return doclink('link-282', 'DIRECTION_IN', 'link-246');">DIRECTION_IN</a></tt><tt class="py-op">,</tt> <tt class="py-param">is_const</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-param">default_value</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L1287"></a><tt class="py-lineno">1287</tt>  <tt class="py-line">                 <tt class="py-param">transfer_ownership</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="PointerParameter.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="PointerParameter.__init__-expanded"><a name="L1288"></a><tt class="py-lineno">1288</tt>  <tt class="py-line">        <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-283" class="py-name" targets="Class pybindgen.typehandlers.base.PointerParameter=pybindgen.typehandlers.base.PointerParameter-class.html"><a title="pybindgen.typehandlers.base.PointerParameter" class="py-name" href="#" onclick="return doclink('link-283', 'PointerParameter', 'link-283');">PointerParameter</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-284" class="py-name"><a title="pybindgen.container.Container.__init__
pybindgen.container.ContainerParameterBase.__init__
pybindgen.container.ContainerPtrParameter.__init__
pybindgen.container.ContainerReturnValue.__init__
pybindgen.container.ContainerReturnValueBase.__init__
pybindgen.container.ContainerTraits.__init__
pybindgen.container.IterNextWrapper.__init__
pybindgen.converter_functions.CToPythonConverter.__init__
pybindgen.converter_functions.PythonToCConverter.__init__
pybindgen.cppattribute.CppInstanceAttributeGetter.__init__
pybindgen.cppattribute.CppInstanceAttributeSetter.__init__
pybindgen.cppattribute.CppStaticAttributeGetter.__init__
pybindgen.cppattribute.CppStaticAttributeSetter.__init__
pybindgen.cppattribute.PyGetSetDef.__init__
pybindgen.cppattribute.PyMetaclass.__init__
pybindgen.cppclass.CppClass.__init__
pybindgen.cppclass.CppHelperClass.__init__
pybindgen.cppclass.FreeFunctionPolicy.__init__
pybindgen.cppclass.MemoryPolicy.__init__
pybindgen.cppclass.ReferenceCountingFunctionsPolicy.__init__
pybindgen.cppclass.ReferenceCountingMethodsPolicy.__init__
pybindgen.cppclass_typehandlers.CppClassParameterBase.__init__
pybindgen.cppclass_typehandlers.CppClassPtrParameter.__init__
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.__init__
pybindgen.cppclass_typehandlers.CppClassRefParameter.__init__
pybindgen.cppclass_typehandlers.CppClassReturnValue.__init__
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.__init__
pybindgen.cppmethod.CppConstructor.__init__
pybindgen.cppmethod.CppDummyMethod.__init__
pybindgen.cppmethod.CppFunctionAsConstructor.__init__
pybindgen.cppmethod.CppMethod.__init__
pybindgen.cppmethod.CppNoConstructor.__init__
pybindgen.cppmethod.CppVirtualMethodParentCaller.__init__
pybindgen.cppmethod.CppVirtualMethodProxy.__init__
pybindgen.cppmethod.CustomCppConstructorWrapper.__init__
pybindgen.cppmethod.CustomCppMethodWrapper.__init__
pybindgen.cppmethod.DummyParameter.__init__
pybindgen.cppmethod.DummyReturnValue.__init__
pybindgen.enum.Enum.__init__
pybindgen.function.CustomFunctionWrapper.__init__
pybindgen.function.Function.__init__
pybindgen.gccxmlparser.AnnotationsScanner.__init__
pybindgen.gccxmlparser.GccXmlTypeRegistry.__init__
pybindgen.gccxmlparser.ModuleParser.__init__
pybindgen.gccxmlparser.PygenSection.__init__
pybindgen.module.Module.__init__
pybindgen.module.ModuleBase.__init__
pybindgen.module.SubModule.__init__
pybindgen.overloading.OverloadedWrapper.__init__
pybindgen.pytypeobject.PyNumberMethods.__init__
pybindgen.pytypeobject.PySequenceMethods.__init__
pybindgen.pytypeobject.PyTypeObject.__init__
pybindgen.typehandlers.base.BuildValueParameters.__init__
pybindgen.typehandlers.base.CodeBlock.CleanupHandle.__init__
pybindgen.typehandlers.base.CodeBlock.__init__
pybindgen.typehandlers.base.DeclarationsScope.__init__
pybindgen.typehandlers.base.ForwardWrapperBase.__init__
pybindgen.typehandlers.base.Parameter.__init__
pybindgen.typehandlers.base.Parameter.__metaclass__.__init__
pybindgen.typehandlers.base.ParseTupleParameters.__init__
pybindgen.typehandlers.base.PointerParameter.__init__
pybindgen.typehandlers.base.PointerReturnValue.__init__
pybindgen.typehandlers.base.ReturnValue.__init__
pybindgen.typehandlers.base.ReturnValue.__metaclass__.__init__
pybindgen.typehandlers.base.ReverseWrapperBase.__init__
pybindgen.typehandlers.base.TypeHandler.__init__
pybindgen.typehandlers.base.TypeMatcher.__init__
pybindgen.typehandlers.codesink.CodeSink.__init__
pybindgen.typehandlers.codesink.FileCodeSink.__init__
pybindgen.typehandlers.codesink.MemoryCodeSink.__init__
pybindgen.typehandlers.codesink.NullCodeSink.__init__
pybindgen.typehandlers.ctypeparser.CType.__init__
pybindgen.typehandlers.ctypeparser.TypeTraits.__init__
pybindgen.typehandlers.ctypeparser.tokenizer.Token.__init__
pybindgen.typehandlers.floattype.FloatPtrParam.__init__
pybindgen.typehandlers.inttype.Int8PtrParam.__init__
pybindgen.typehandlers.inttype.IntPtrParam.__init__
pybindgen.typehandlers.inttype.UInt8PtrParam.__init__
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.__init__
pybindgen.typehandlers.pyobjecttype.PyObjectParam.__init__
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.__init__
pybindgen.wrapper_registry.NullWrapperRegistry.__init__
pybindgen.wrapper_registry.StdMapWrapperRegistry.__init__
pybindgen.wrapper_registry.WrapperRegistry.__init__" class="py-name" href="#" onclick="return doclink('link-284', '__init__', 'link-224');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">ctype</tt><tt class="py-op">,</tt> <tt id="link-285" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-285', 'name', 'link-4');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">direction</tt><tt class="py-op">,</tt> <tt class="py-name">is_const</tt><tt class="py-op">,</tt> <tt class="py-name">default_value</tt><tt class="py-op">)</tt> </tt>
<a name="L1289"></a><tt class="py-lineno">1289</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">transfer_ownership</tt> <tt class="py-op">=</tt> <tt class="py-name">transfer_ownership</tt> </tt>
</div></div><a name="L1290"></a><tt class="py-lineno">1290</tt>  <tt class="py-line"> </tt>
<a name="L1291"></a><tt class="py-lineno">1291</tt>  <tt class="py-line"><tt id="link-286" class="py-name"><a title="pybindgen.typehandlers.base.PointerParameter" class="py-name" href="#" onclick="return doclink('link-286', 'PointerParameter', 'link-283');">PointerParameter</a></tt><tt class="py-op">.</tt><tt id="link-287" class="py-name"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-287', 'CTYPES', 'link-221');">CTYPES</a></tt> <tt class="py-op">=</tt> <tt class="py-name">NotImplemented</tt> </tt>
<a name="L1292"></a><tt class="py-lineno">1292</tt>  <tt class="py-line"> </tt>
<a name="L1293"></a><tt class="py-lineno">1293</tt>  <tt class="py-line"> </tt>
<a name="TypeMatcher"></a><div id="TypeMatcher-def"><a name="L1294"></a><tt class="py-lineno">1294</tt> <a class="py-toggle" href="#" id="TypeMatcher-toggle" onclick="return toggle('TypeMatcher');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.TypeMatcher-class.html">TypeMatcher</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TypeMatcher-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="TypeMatcher-expanded"><a name="L1295"></a><tt class="py-lineno">1295</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L1296"></a><tt class="py-lineno">1296</tt>  <tt class="py-line"><tt class="py-docstring">    Type matcher object: maps C type names to classes that handle</tt> </tt>
<a name="L1297"></a><tt class="py-lineno">1297</tt>  <tt class="py-line"><tt class="py-docstring">    those types.</tt> </tt>
<a name="L1298"></a><tt class="py-lineno">1298</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L1299"></a><tt class="py-lineno">1299</tt>  <tt class="py-line">     </tt>
<a name="TypeMatcher.__init__"></a><div id="TypeMatcher.__init__-def"><a name="L1300"></a><tt class="py-lineno">1300</tt> <a class="py-toggle" href="#" id="TypeMatcher.__init__-toggle" onclick="return toggle('TypeMatcher.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.TypeMatcher-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TypeMatcher.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="TypeMatcher.__init__-expanded"><a name="L1301"></a><tt class="py-lineno">1301</tt>  <tt class="py-line">        <tt class="py-docstring">"""Constructor"""</tt> </tt>
<a name="L1302"></a><tt class="py-lineno">1302</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_types</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L1303"></a><tt class="py-lineno">1303</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_transformations</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L1304"></a><tt class="py-lineno">1304</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_type_aliases</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
</div><a name="L1305"></a><tt class="py-lineno">1305</tt>  <tt class="py-line"> </tt>
<a name="L1306"></a><tt class="py-lineno">1306</tt>  <tt class="py-line"> </tt>
<a name="TypeMatcher.register_transformation"></a><div id="TypeMatcher.register_transformation-def"><a name="L1307"></a><tt class="py-lineno">1307</tt> <a class="py-toggle" href="#" id="TypeMatcher.register_transformation-toggle" onclick="return toggle('TypeMatcher.register_transformation');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.TypeMatcher-class.html#register_transformation">register_transformation</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">transformation</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TypeMatcher.register_transformation-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="TypeMatcher.register_transformation-expanded"><a name="L1308"></a><tt class="py-lineno">1308</tt>  <tt class="py-line">        <tt class="py-docstring">"Register a type transformation object"</tt> </tt>
<a name="L1309"></a><tt class="py-lineno">1309</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">transformation</tt><tt class="py-op">,</tt> <tt id="link-288" class="py-name"><a title="pybindgen.typehandlers.base.TypeTransformation" class="py-name" href="#" onclick="return doclink('link-288', 'TypeTransformation', 'link-218');">TypeTransformation</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1310"></a><tt class="py-lineno">1310</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_transformations</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">transformation</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1311"></a><tt class="py-lineno">1311</tt>  <tt class="py-line"> </tt>
<a name="TypeMatcher.register"></a><div id="TypeMatcher.register-def"><a name="L1312"></a><tt class="py-lineno">1312</tt> <a class="py-toggle" href="#" id="TypeMatcher.register-toggle" onclick="return toggle('TypeMatcher.register');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.TypeMatcher-class.html#register">register</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">type_handler</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TypeMatcher.register-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="TypeMatcher.register-expanded"><a name="L1313"></a><tt class="py-lineno">1313</tt>  <tt class="py-line">        <tt class="py-docstring">"""Register a new handler class for a given C type</tt> </tt>
<a name="L1314"></a><tt class="py-lineno">1314</tt>  <tt class="py-line"><tt class="py-docstring">        @param name: C type name</tt> </tt>
<a name="L1315"></a><tt class="py-lineno">1315</tt>  <tt class="py-line"><tt class="py-docstring">        @param type_handler: class to handle this C type</tt> </tt>
<a name="L1316"></a><tt class="py-lineno">1316</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1317"></a><tt class="py-lineno">1317</tt>  <tt class="py-line">        <tt id="link-289" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-289', 'name', 'link-4');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-290" class="py-name"><a title="pybindgen.typehandlers.ctypeparser" class="py-name" href="#" onclick="return doclink('link-290', 'ctypeparser', 'link-1');">ctypeparser</a></tt><tt class="py-op">.</tt><tt id="link-291" class="py-name" targets="Function pybindgen.typehandlers.ctypeparser.normalize_type_string()=pybindgen.typehandlers.ctypeparser-module.html#normalize_type_string"><a title="pybindgen.typehandlers.ctypeparser.normalize_type_string" class="py-name" href="#" onclick="return doclink('link-291', 'normalize_type_string', 'link-291');">normalize_type_string</a></tt><tt class="py-op">(</tt><tt id="link-292" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-292', 'name', 'link-4');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1318"></a><tt class="py-lineno">1318</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-293" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-293', 'name', 'link-4');">name</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_types</tt><tt class="py-op">:</tt> </tt>
<a name="L1319"></a><tt class="py-lineno">1319</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"return type %s already registered"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-294" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-294', 'name', 'link-4');">name</a></tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1320"></a><tt class="py-lineno">1320</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_types</tt><tt class="py-op">[</tt><tt id="link-295" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-295', 'name', 'link-4');">name</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">type_handler</tt> </tt>
</div><a name="L1321"></a><tt class="py-lineno">1321</tt>  <tt class="py-line"> </tt>
<a name="TypeMatcher._raw_lookup_with_alias_support"></a><div id="TypeMatcher._raw_lookup_with_alias_support-def"><a name="L1322"></a><tt class="py-lineno">1322</tt> <a class="py-toggle" href="#" id="TypeMatcher._raw_lookup_with_alias_support-toggle" onclick="return toggle('TypeMatcher._raw_lookup_with_alias_support');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.TypeMatcher-class.html#_raw_lookup_with_alias_support">_raw_lookup_with_alias_support</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TypeMatcher._raw_lookup_with_alias_support-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="TypeMatcher._raw_lookup_with_alias_support-expanded"><a name="L1323"></a><tt class="py-lineno">1323</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1324"></a><tt class="py-lineno">1324</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_types</tt><tt class="py-op">[</tt><tt id="link-296" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-296', 'name', 'link-4');">name</a></tt><tt class="py-op">]</tt> </tt>
<a name="L1325"></a><tt class="py-lineno">1325</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
<a name="L1326"></a><tt class="py-lineno">1326</tt>  <tt class="py-line">            <tt class="py-name">alias</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_type_aliases</tt><tt class="py-op">[</tt><tt id="link-297" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-297', 'name', 'link-4');">name</a></tt><tt class="py-op">]</tt> </tt>
<a name="L1327"></a><tt class="py-lineno">1327</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_raw_lookup_with_alias_support</tt><tt class="py-op">(</tt><tt class="py-name">alias</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1328"></a><tt class="py-lineno">1328</tt>  <tt class="py-line">         </tt>
<a name="TypeMatcher.lookup"></a><div id="TypeMatcher.lookup-def"><a name="L1329"></a><tt class="py-lineno">1329</tt> <a class="py-toggle" href="#" id="TypeMatcher.lookup-toggle" onclick="return toggle('TypeMatcher.lookup');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.TypeMatcher-class.html#lookup">lookup</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TypeMatcher.lookup-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="TypeMatcher.lookup-expanded"><a name="L1330"></a><tt class="py-lineno">1330</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1331"></a><tt class="py-lineno">1331</tt>  <tt class="py-line"><tt class="py-docstring">        lookup(name) -&gt; type_handler, type_transformation, type_traits</tt> </tt>
<a name="L1332"></a><tt class="py-lineno">1332</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1333"></a><tt class="py-lineno">1333</tt>  <tt class="py-line"><tt class="py-docstring">        Returns a handler with the given ctype name, or raises KeyError.</tt> </tt>
<a name="L1334"></a><tt class="py-lineno">1334</tt>  <tt class="py-line"><tt class="py-docstring">        Supports type transformations.</tt> </tt>
<a name="L1335"></a><tt class="py-lineno">1335</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1336"></a><tt class="py-lineno">1336</tt>  <tt class="py-line"><tt class="py-docstring">        @param name: C type name, possibly transformed (e.g. MySmartPointer&lt;Foo&gt; looks up Foo*)</tt> </tt>
<a name="L1337"></a><tt class="py-lineno">1337</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1338"></a><tt class="py-lineno">1338</tt>  <tt class="py-line">        <tt id="link-298" class="py-name"><a title="pybindgen.typehandlers.base.logger" class="py-name" href="#" onclick="return doclink('link-298', 'logger', 'link-2');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"TypeMatcher.lookup(%r)"</tt><tt class="py-op">,</tt> <tt id="link-299" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-299', 'name', 'link-4');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1339"></a><tt class="py-lineno">1339</tt>  <tt class="py-line">        <tt class="py-name">given_type_traits</tt> <tt class="py-op">=</tt> <tt id="link-300" class="py-name"><a title="pybindgen.typehandlers.ctypeparser" class="py-name" href="#" onclick="return doclink('link-300', 'ctypeparser', 'link-1');">ctypeparser</a></tt><tt class="py-op">.</tt><tt id="link-301" class="py-name"><a title="pybindgen.typehandlers.ctypeparser.TypeTraits" class="py-name" href="#" onclick="return doclink('link-301', 'TypeTraits', 'link-206');">TypeTraits</a></tt><tt class="py-op">(</tt><tt id="link-302" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-302', 'name', 'link-4');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1340"></a><tt class="py-lineno">1340</tt>  <tt class="py-line">        <tt class="py-name">noconst_name</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">given_type_traits</tt><tt class="py-op">.</tt><tt class="py-name">ctype_no_modifiers</tt><tt class="py-op">)</tt> </tt>
<a name="L1341"></a><tt class="py-lineno">1341</tt>  <tt class="py-line">        <tt class="py-name">tried_names</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">noconst_name</tt><tt class="py-op">]</tt> </tt>
<a name="L1342"></a><tt class="py-lineno">1342</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1343"></a><tt class="py-lineno">1343</tt>  <tt class="py-line">            <tt class="py-name">rv</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_raw_lookup_with_alias_support</tt><tt class="py-op">(</tt><tt class="py-name">noconst_name</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">given_type_traits</tt> </tt>
<a name="L1344"></a><tt class="py-lineno">1344</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
<a name="L1345"></a><tt class="py-lineno">1345</tt>  <tt class="py-line">            <tt id="link-303" class="py-name"><a title="pybindgen.typehandlers.base.logger" class="py-name" href="#" onclick="return doclink('link-303', 'logger', 'link-2');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"try to lookup type handler for %r =&gt; failure"</tt><tt class="py-op">,</tt> <tt id="link-304" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-304', 'name', 'link-4');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1346"></a><tt class="py-lineno">1346</tt>  <tt class="py-line">            <tt class="py-comment">## Now try all the type transformations</tt> </tt>
<a name="L1347"></a><tt class="py-lineno">1347</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">transf</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_transformations</tt><tt class="py-op">:</tt> </tt>
<a name="L1348"></a><tt class="py-lineno">1348</tt>  <tt class="py-line">                <tt class="py-name">untransformed_name</tt> <tt class="py-op">=</tt> <tt class="py-name">transf</tt><tt class="py-op">.</tt><tt id="link-305" class="py-name" targets="Method pybindgen.typehandlers.base.NullTypeTransformation.get_untransformed_name()=pybindgen.typehandlers.base.NullTypeTransformation-class.html#get_untransformed_name,Method pybindgen.typehandlers.base.TypeTransformation.get_untransformed_name()=pybindgen.typehandlers.base.TypeTransformation-class.html#get_untransformed_name"><a title="pybindgen.typehandlers.base.NullTypeTransformation.get_untransformed_name
pybindgen.typehandlers.base.TypeTransformation.get_untransformed_name" class="py-name" href="#" onclick="return doclink('link-305', 'get_untransformed_name', 'link-305');">get_untransformed_name</a></tt><tt class="py-op">(</tt><tt id="link-306" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-306', 'name', 'link-4');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1349"></a><tt class="py-lineno">1349</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">untransformed_name</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1350"></a><tt class="py-lineno">1350</tt>  <tt class="py-line">                    <tt class="py-keyword">continue</tt> </tt>
<a name="L1351"></a><tt class="py-lineno">1351</tt>  <tt class="py-line">                <tt class="py-name">untransformed_type_traits</tt> <tt class="py-op">=</tt> <tt id="link-307" class="py-name"><a title="pybindgen.typehandlers.ctypeparser" class="py-name" href="#" onclick="return doclink('link-307', 'ctypeparser', 'link-1');">ctypeparser</a></tt><tt class="py-op">.</tt><tt id="link-308" class="py-name"><a title="pybindgen.typehandlers.ctypeparser.TypeTraits" class="py-name" href="#" onclick="return doclink('link-308', 'TypeTraits', 'link-206');">TypeTraits</a></tt><tt class="py-op">(</tt><tt class="py-name">untransformed_name</tt><tt class="py-op">)</tt> </tt>
<a name="L1352"></a><tt class="py-lineno">1352</tt>  <tt class="py-line">                <tt class="py-name">untransformed_name</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">untransformed_type_traits</tt><tt class="py-op">.</tt><tt class="py-name">ctype_no_modifiers</tt><tt class="py-op">)</tt> </tt>
<a name="L1353"></a><tt class="py-lineno">1353</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1354"></a><tt class="py-lineno">1354</tt>  <tt class="py-line">                    <tt class="py-name">rv</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_raw_lookup_with_alias_support</tt><tt class="py-op">(</tt><tt class="py-name">untransformed_name</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">transf</tt><tt class="py-op">,</tt> <tt class="py-name">untransformed_type_traits</tt> </tt>
<a name="L1355"></a><tt class="py-lineno">1355</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
<a name="L1356"></a><tt class="py-lineno">1356</tt>  <tt class="py-line">                    <tt id="link-309" class="py-name"><a title="pybindgen.typehandlers.base.logger" class="py-name" href="#" onclick="return doclink('link-309', 'logger', 'link-2');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"try to lookup type handler for %r =&gt; failure (%r)"</tt><tt class="py-op">,</tt> <tt class="py-name">untransformed_name</tt><tt class="py-op">)</tt> </tt>
<a name="L1357"></a><tt class="py-lineno">1357</tt>  <tt class="py-line">                    <tt class="py-name">tried_names</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">untransformed_name</tt><tt class="py-op">)</tt> </tt>
<a name="L1358"></a><tt class="py-lineno">1358</tt>  <tt class="py-line">                    <tt class="py-keyword">continue</tt> </tt>
<a name="L1359"></a><tt class="py-lineno">1359</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1360"></a><tt class="py-lineno">1360</tt>  <tt class="py-line">                    <tt id="link-310" class="py-name"><a title="pybindgen.typehandlers.base.logger" class="py-name" href="#" onclick="return doclink('link-310', 'logger', 'link-2');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"try to lookup type handler for %r =&gt; success (%r)"</tt><tt class="py-op">,</tt> <tt class="py-name">untransformed_name</tt><tt class="py-op">,</tt> <tt class="py-name">rv</tt><tt class="py-op">)</tt> </tt>
<a name="L1361"></a><tt class="py-lineno">1361</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">rv</tt> </tt>
<a name="L1362"></a><tt class="py-lineno">1362</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1363"></a><tt class="py-lineno">1363</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt id="link-311" class="py-name" targets="Class pybindgen.typehandlers.base.TypeLookupError=pybindgen.typehandlers.base.TypeLookupError-class.html"><a title="pybindgen.typehandlers.base.TypeLookupError" class="py-name" href="#" onclick="return doclink('link-311', 'TypeLookupError', 'link-311');">TypeLookupError</a></tt><tt class="py-op">(</tt><tt class="py-name">tried_names</tt><tt class="py-op">)</tt> </tt>
<a name="L1364"></a><tt class="py-lineno">1364</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1365"></a><tt class="py-lineno">1365</tt>  <tt class="py-line">            <tt id="link-312" class="py-name"><a title="pybindgen.typehandlers.base.logger" class="py-name" href="#" onclick="return doclink('link-312', 'logger', 'link-2');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">debug</tt><tt class="py-op">(</tt><tt class="py-string">"try to lookup type handler for %r =&gt; success (%r)"</tt><tt class="py-op">,</tt> <tt id="link-313" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-313', 'name', 'link-4');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">rv</tt><tt class="py-op">)</tt> </tt>
<a name="L1366"></a><tt class="py-lineno">1366</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">rv</tt> </tt>
</div><a name="L1367"></a><tt class="py-lineno">1367</tt>  <tt class="py-line">     </tt>
<a name="TypeMatcher.items"></a><div id="TypeMatcher.items-def"><a name="L1368"></a><tt class="py-lineno">1368</tt> <a class="py-toggle" href="#" id="TypeMatcher.items-toggle" onclick="return toggle('TypeMatcher.items');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.TypeMatcher-class.html#items">items</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TypeMatcher.items-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="TypeMatcher.items-expanded"><a name="L1369"></a><tt class="py-lineno">1369</tt>  <tt class="py-line">        <tt class="py-docstring">"Returns an iterator over all registered items"</tt> </tt>
<a name="L1370"></a><tt class="py-lineno">1370</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_types</tt><tt class="py-op">.</tt><tt class="py-name">iteritems</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1371"></a><tt class="py-lineno">1371</tt>  <tt class="py-line"> </tt>
<a name="TypeMatcher.add_type_alias"></a><div id="TypeMatcher.add_type_alias-def"><a name="L1372"></a><tt class="py-lineno">1372</tt> <a class="py-toggle" href="#" id="TypeMatcher.add_type_alias-toggle" onclick="return toggle('TypeMatcher.add_type_alias');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base.TypeMatcher-class.html#add_type_alias">add_type_alias</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">from_type_name</tt><tt class="py-op">,</tt> <tt class="py-param">to_type_name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TypeMatcher.add_type_alias-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="TypeMatcher.add_type_alias-expanded"><a name="L1373"></a><tt class="py-lineno">1373</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_type_aliases</tt><tt class="py-op">[</tt><tt class="py-name">to_type_name</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">from_type_name</tt> </tt>
</div></div><a name="L1374"></a><tt class="py-lineno">1374</tt>  <tt class="py-line"> </tt>
<a name="L1375"></a><tt class="py-lineno">1375</tt>  <tt class="py-line"><tt id="link-314" class="py-name"><a title="pybindgen.typehandlers.base.return_type_matcher" class="py-name" href="#" onclick="return doclink('link-314', 'return_type_matcher', 'link-228');">return_type_matcher</a></tt> <tt class="py-op">=</tt> <tt id="link-315" class="py-name" targets="Class pybindgen.typehandlers.base.TypeMatcher=pybindgen.typehandlers.base.TypeMatcher-class.html"><a title="pybindgen.typehandlers.base.TypeMatcher" class="py-name" href="#" onclick="return doclink('link-315', 'TypeMatcher', 'link-315');">TypeMatcher</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1376"></a><tt class="py-lineno">1376</tt>  <tt class="py-line"><tt id="link-316" class="py-name"><a title="pybindgen.typehandlers.base.param_type_matcher" class="py-name" href="#" onclick="return doclink('link-316', 'param_type_matcher', 'link-261');">param_type_matcher</a></tt> <tt class="py-op">=</tt> <tt id="link-317" class="py-name"><a title="pybindgen.typehandlers.base.TypeMatcher" class="py-name" href="#" onclick="return doclink('link-317', 'TypeMatcher', 'link-315');">TypeMatcher</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1377"></a><tt class="py-lineno">1377</tt>  <tt class="py-line"> </tt>
<a name="add_type_alias"></a><div id="add_type_alias-def"><a name="L1378"></a><tt class="py-lineno">1378</tt> <a class="py-toggle" href="#" id="add_type_alias-toggle" onclick="return toggle('add_type_alias');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.typehandlers.base-module.html#add_type_alias">add_type_alias</a><tt class="py-op">(</tt><tt class="py-param">from_type_name</tt><tt class="py-op">,</tt> <tt class="py-param">to_type_name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="add_type_alias-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="add_type_alias-expanded"><a name="L1379"></a><tt class="py-lineno">1379</tt>  <tt class="py-line">    <tt id="link-318" class="py-name"><a title="pybindgen.typehandlers.base.return_type_matcher" class="py-name" href="#" onclick="return doclink('link-318', 'return_type_matcher', 'link-228');">return_type_matcher</a></tt><tt class="py-op">.</tt><tt id="link-319" class="py-name" targets="Method pybindgen.typehandlers.base.TypeMatcher.add_type_alias()=pybindgen.typehandlers.base.TypeMatcher-class.html#add_type_alias,Function pybindgen.typehandlers.base.add_type_alias()=pybindgen.typehandlers.base-module.html#add_type_alias"><a title="pybindgen.typehandlers.base.TypeMatcher.add_type_alias
pybindgen.typehandlers.base.add_type_alias" class="py-name" href="#" onclick="return doclink('link-319', 'add_type_alias', 'link-319');">add_type_alias</a></tt><tt class="py-op">(</tt><tt class="py-name">from_type_name</tt><tt class="py-op">,</tt> <tt class="py-name">to_type_name</tt><tt class="py-op">)</tt> </tt>
<a name="L1380"></a><tt class="py-lineno">1380</tt>  <tt class="py-line">    <tt id="link-320" class="py-name"><a title="pybindgen.typehandlers.base.param_type_matcher" class="py-name" href="#" onclick="return doclink('link-320', 'param_type_matcher', 'link-261');">param_type_matcher</a></tt><tt class="py-op">.</tt><tt id="link-321" class="py-name"><a title="pybindgen.typehandlers.base.TypeMatcher.add_type_alias
pybindgen.typehandlers.base.add_type_alias" class="py-name" href="#" onclick="return doclink('link-321', 'add_type_alias', 'link-319');">add_type_alias</a></tt><tt class="py-op">(</tt><tt class="py-name">from_type_name</tt><tt class="py-op">,</tt> <tt class="py-name">to_type_name</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1381"></a><tt class="py-lineno">1381</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pybindgen-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Sun Jul 12 17:23:43 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
